Spaces:
Sleeping
Sleeping
Commit
·
8d07d2f
1
Parent(s):
8471c05
feat: add padding
Browse files
app.py
CHANGED
|
@@ -52,7 +52,7 @@ def classify_pairs(model, tokenizer, prompts, responses):
|
|
| 52 |
]
|
| 53 |
|
| 54 |
with torch.inference_mode():
|
| 55 |
-
input_ids = tokenizer(texts, truncation=True, max_length=512, return_tensors="pt").to(model.device)
|
| 56 |
outputs = model(**input_ids).logits
|
| 57 |
|
| 58 |
return outputs
|
|
|
|
| 52 |
]
|
| 53 |
|
| 54 |
with torch.inference_mode():
|
| 55 |
+
input_ids = tokenizer(texts, padding=True, truncation=True, max_length=512, return_tensors="pt").to(model.device)
|
| 56 |
outputs = model(**input_ids).logits
|
| 57 |
|
| 58 |
return outputs
|