Spaces:
Runtime error
Runtime error
Update main.py
Browse files
main.py
CHANGED
|
@@ -60,6 +60,11 @@ def predict_audio(file_path):
|
|
| 60 |
# ScamText model setup
|
| 61 |
scamtext_pipe = pipeline("text-classification", model="phishbot/ScamLLM")
|
| 62 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
# Initialize FastAPI
|
| 64 |
app = FastAPI()
|
| 65 |
|
|
@@ -75,7 +80,7 @@ async def deepfake_infer(file: UploadFile = File(...)):
|
|
| 75 |
return predictions
|
| 76 |
|
| 77 |
@app.post("/scamtext/infer")
|
| 78 |
-
async def scamtext_infer(data:
|
| 79 |
predictions = scamtext_pipe(data.input)
|
| 80 |
return predictions
|
| 81 |
|
|
|
|
| 60 |
# ScamText model setup
|
| 61 |
scamtext_pipe = pipeline("text-classification", model="phishbot/ScamLLM")
|
| 62 |
|
| 63 |
+
# Input model for scam text inference
|
| 64 |
+
class TextInput(BaseModel):
|
| 65 |
+
input: str
|
| 66 |
+
|
| 67 |
+
|
| 68 |
# Initialize FastAPI
|
| 69 |
app = FastAPI()
|
| 70 |
|
|
|
|
| 80 |
return predictions
|
| 81 |
|
| 82 |
@app.post("/scamtext/infer")
|
| 83 |
+
async def scamtext_infer(data: TextInput):
|
| 84 |
predictions = scamtext_pipe(data.input)
|
| 85 |
return predictions
|
| 86 |
|