Update app.py
Browse files
app.py
CHANGED
@@ -70,7 +70,7 @@ async def batch_predict(request: BatchTextRequest):
|
|
70 |
results.append({"id": idx + 1, "text": text, "prediction": label})
|
71 |
|
72 |
logger.info(f"Batch prediction results: {results}")
|
73 |
-
return {"results": results}
|
74 |
|
75 |
except Exception as e:
|
76 |
logger.error(f"Batch prediction failed: {e}")
|
|
|
70 |
results.append({"id": idx + 1, "text": text, "prediction": label})
|
71 |
|
72 |
logger.info(f"Batch prediction results: {results}")
|
73 |
+
return JSONResponse(content={"results": results}, media_type="application/json; charset=utf-8")
|
74 |
|
75 |
except Exception as e:
|
76 |
logger.error(f"Batch prediction failed: {e}")
|