chryzxc commited on
Commit
2a0a38d
·
verified ·
1 Parent(s): 3be5098

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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
- inputs = tokenizer(
43
  text,
44
  return_tensors="np",
45
- padding="max_length",
46
- truncation=True,
47
- max_length=32
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