Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
|
@@ -71,8 +71,11 @@ def parse_resume_text(text: str) -> dict:
|
|
| 71 |
Return ONLY valid JSON, no text, no explanation.
|
| 72 |
"""
|
| 73 |
result = llm([HumanMessage(content=prompt)])
|
| 74 |
-
|
| 75 |
-
|
|
|
|
|
|
|
|
|
|
| 76 |
|
| 77 |
# ✅ Save uploaded file asynchronously
|
| 78 |
async def save_file(file: UploadFile) -> str:
|
|
|
|
| 71 |
Return ONLY valid JSON, no text, no explanation.
|
| 72 |
"""
|
| 73 |
result = llm([HumanMessage(content=prompt)])
|
| 74 |
+
raw_string = result.replace("```json\n", "").replace("\n```", "")
|
| 75 |
+
data = json.loads(raw_string)
|
| 76 |
+
return (json.dumps(data, indent=2))
|
| 77 |
+
|
| 78 |
+
|
| 79 |
|
| 80 |
# ✅ Save uploaded file asynchronously
|
| 81 |
async def save_file(file: UploadFile) -> str:
|