Update app.py
Browse files
app.py
CHANGED
|
@@ -29,10 +29,10 @@ async def c(query:Query):
|
|
| 29 |
try:
|
| 30 |
predictions, raw_outputs = rob_chem_model.predict([str(query.query)])
|
| 31 |
print(predictions)
|
| 32 |
-
json_compatible_item_data = jsonable_encoder(predictions[0])
|
| 33 |
-
return JSONResponse(content=json_compatible_item_data)
|
| 34 |
-
|
| 35 |
-
|
| 36 |
|
| 37 |
|
| 38 |
except Exception as e:
|
|
|
|
| 29 |
try:
|
| 30 |
predictions, raw_outputs = rob_chem_model.predict([str(query.query)])
|
| 31 |
print(predictions)
|
| 32 |
+
#json_compatible_item_data = jsonable_encoder(predictions[0])
|
| 33 |
+
#return JSONResponse(content=json_compatible_item_data)
|
| 34 |
+
answer = {"prediction":predictions[0]}
|
| 35 |
+
return {'response':answer}
|
| 36 |
|
| 37 |
|
| 38 |
except Exception as e:
|