Alexvatti commited on
Commit
4821717
·
verified ·
1 Parent(s): 04540e7

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +5 -2
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
- return result.content
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: