Update app.py
Browse files
app.py
CHANGED
@@ -23,7 +23,7 @@ class TextRequest(BaseModel):
|
|
23 |
class BatchTextRequest(BaseModel):
|
24 |
texts: list[str]
|
25 |
|
26 |
-
|
27 |
@app.post("/predict")
|
28 |
async def predict(request: TextRequest):
|
29 |
try:
|
@@ -44,7 +44,7 @@ async def predict(request: TextRequest):
|
|
44 |
except Exception as e:
|
45 |
raise HTTPException(status_code=500, detail=f"Prediction failed: {e}")
|
46 |
|
47 |
-
|
48 |
@app.post("/batch_predict")
|
49 |
async def batch_predict(request: BatchTextRequest):
|
50 |
try:
|
|
|
23 |
class BatchTextRequest(BaseModel):
|
24 |
texts: list[str]
|
25 |
|
26 |
+
|
27 |
@app.post("/predict")
|
28 |
async def predict(request: TextRequest):
|
29 |
try:
|
|
|
44 |
except Exception as e:
|
45 |
raise HTTPException(status_code=500, detail=f"Prediction failed: {e}")
|
46 |
|
47 |
+
|
48 |
@app.post("/batch_predict")
|
49 |
async def batch_predict(request: BatchTextRequest):
|
50 |
try:
|