Update app.py
Browse files
app.py
CHANGED
@@ -39,12 +39,12 @@ async def predict(request: Request):
|
|
39 |
raise HTTPException(status_code=400, detail="No text provided")
|
40 |
|
41 |
# Tokenize input
|
42 |
-
|
43 |
text,
|
44 |
return_tensors="np",
|
45 |
-
padding=
|
46 |
-
truncation=
|
47 |
-
|
48 |
)
|
49 |
|
50 |
# Run model
|
|
|
39 |
raise HTTPException(status_code=400, detail="No text provided")
|
40 |
|
41 |
# Tokenize input
|
42 |
+
inputs = tokenizer(
|
43 |
text,
|
44 |
return_tensors="np",
|
45 |
+
padding=False, # Disable padding
|
46 |
+
truncation=False, # Disable truncation
|
47 |
+
add_special_tokens=True # Ensure CLS/SEP tokens
|
48 |
)
|
49 |
|
50 |
# Run model
|