Max005 commited on
Commit
9a76b1f
·
1 Parent(s): 3562f68

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +6 -1
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: BaseModel):
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