Update app.py
Browse files
app.py
CHANGED
|
@@ -16,6 +16,10 @@ model = AutoModelForSequenceClassification.from_pretrained(MODEL_ID)
|
|
| 16 |
class EmailInput(BaseModel):
|
| 17 |
text: str
|
| 18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
@app.post("/predict")
|
| 20 |
async def predict_email(data: EmailInput):
|
| 21 |
# PRE-PROCESS: Handle very short text manually to avoid "Model Hallucinations"
|
|
|
|
| 16 |
class EmailInput(BaseModel):
|
| 17 |
text: str
|
| 18 |
|
| 19 |
+
@app.post("/")
|
| 20 |
+
async def testingFunction():
|
| 21 |
+
return "Api working fine..."
|
| 22 |
+
|
| 23 |
@app.post("/predict")
|
| 24 |
async def predict_email(data: EmailInput):
|
| 25 |
# PRE-PROCESS: Handle very short text manually to avoid "Model Hallucinations"
|