Spaces:
Sleeping
Sleeping
Commit
·
8471c05
1
Parent(s):
7cb92d1
fix: return tensors
Browse files
app.py
CHANGED
|
@@ -52,8 +52,8 @@ def classify_pairs(model, tokenizer, prompts, responses):
|
|
| 52 |
]
|
| 53 |
|
| 54 |
with torch.inference_mode():
|
| 55 |
-
input_ids = tokenizer(texts, truncation=True, max_length=512).to(model.device)
|
| 56 |
-
outputs = model(**input_ids)
|
| 57 |
|
| 58 |
return outputs
|
| 59 |
|
|
|
|
| 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
|
| 59 |
|