Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
|
@@ -38,8 +38,7 @@ async def health_check():
|
|
| 38 |
|
| 39 |
@app.post("/parse-cv/", tags=["CV Parsing"])
|
| 40 |
async def parse_cv_endpoint(
|
| 41 |
-
file: UploadFile = File(...)
|
| 42 |
-
user_id: str = Query(None, description="ID of the user to link the CV to")
|
| 43 |
):
|
| 44 |
"""
|
| 45 |
Parses a CV file (PDF) and returns the parsed data.
|
|
@@ -54,7 +53,7 @@ async def parse_cv_endpoint(
|
|
| 54 |
tmp_path = tmp.name
|
| 55 |
|
| 56 |
try:
|
| 57 |
-
result = await run_in_threadpool(parse_cv, tmp_path
|
| 58 |
finally:
|
| 59 |
if os.path.exists(tmp_path):
|
| 60 |
os.remove(tmp_path)
|
|
|
|
| 38 |
|
| 39 |
@app.post("/parse-cv/", tags=["CV Parsing"])
|
| 40 |
async def parse_cv_endpoint(
|
| 41 |
+
file: UploadFile = File(...)
|
|
|
|
| 42 |
):
|
| 43 |
"""
|
| 44 |
Parses a CV file (PDF) and returns the parsed data.
|
|
|
|
| 53 |
tmp_path = tmp.name
|
| 54 |
|
| 55 |
try:
|
| 56 |
+
result = await run_in_threadpool(parse_cv, tmp_path)
|
| 57 |
finally:
|
| 58 |
if os.path.exists(tmp_path):
|
| 59 |
os.remove(tmp_path)
|