Update main.py
Browse files
main.py
CHANGED
|
@@ -116,7 +116,7 @@ async def get_data(input_file: UploadFile = File(...)):
|
|
| 116 |
|
| 117 |
response = model_text.generate_content(prompt)
|
| 118 |
print(response.text)
|
| 119 |
-
data = json.loads(response.text.replace("
|
| 120 |
return {"data": data}
|
| 121 |
|
| 122 |
#except Exception as e:
|
|
|
|
| 116 |
|
| 117 |
response = model_text.generate_content(prompt)
|
| 118 |
print(response.text)
|
| 119 |
+
data = json.loads(response.text.replace("JSON", "").replace("json", "").replace("```", ""))
|
| 120 |
return {"data": data}
|
| 121 |
|
| 122 |
#except Exception as e:
|