Spaces:
Running
on
L4
Running
on
L4
Update app.py
Browse files
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():
|