Update app.py
Browse files
app.py
CHANGED
@@ -109,7 +109,7 @@ async def batch_predict(request: BatchTextRequest):
|
|
109 |
{"id": idx + 1, "text": text, "prediction": "Spam" if pred == 1 else "Ham"}
|
110 |
for idx, (text, pred) in enumerate(zip(request.texts, predictions))
|
111 |
]
|
112 |
-
|
113 |
return {"results": results}
|
114 |
|
115 |
except Exception as e:
|
|
|
109 |
{"id": idx + 1, "text": text, "prediction": "Spam" if pred == 1 else "Ham"}
|
110 |
for idx, (text, pred) in enumerate(zip(request.texts, predictions))
|
111 |
]
|
112 |
+
logger.info(f"Batch prediction results: {results}")
|
113 |
return {"results": results}
|
114 |
|
115 |
except Exception as e:
|