Spaces:
Running
Running
aliasgerovs
commited on
Commit
•
4fe4f07
1
Parent(s):
617df1d
Update app.py
Browse files
app.py
CHANGED
@@ -203,7 +203,7 @@ def predict_bc(model, tokenizer, text):
|
|
203 |
|
204 |
def predict_mc(model, tokenizer, text):
|
205 |
tokens = tokenizer(
|
206 |
-
text, padding=
|
207 |
).to(device)["input_ids"]
|
208 |
output = model(tokens)
|
209 |
output_norm = softmax(output.logits.detach().cpu().numpy(), 1)[0]
|
|
|
203 |
|
204 |
def predict_mc(model, tokenizer, text):
|
205 |
tokens = tokenizer(
|
206 |
+
text, padding='max_length', truncation=True, return_tensors="pt", max_length=512
|
207 |
).to(device)["input_ids"]
|
208 |
output = model(tokens)
|
209 |
output_norm = softmax(output.logits.detach().cpu().numpy(), 1)[0]
|