Bijoy09 commited on
Commit
1b1a84c
1 Parent(s): 0d35220

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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}")