samidh commited on
Commit
c79a5b3
·
verified ·
1 Parent(s): 80fe085

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -172,6 +172,8 @@ def predict_batch(contents, policies):
172
  input_ids = tokenizer(
173
  input_texts,
174
  return_tensors="pt",
 
 
175
  ).input_ids.to(model.device)
176
 
177
  with torch.inference_mode():
 
172
  input_ids = tokenizer(
173
  input_texts,
174
  return_tensors="pt",
175
+ padding=True,
176
+ truncation=True
177
  ).input_ids.to(model.device)
178
 
179
  with torch.inference_mode():