aliasgerovs commited on
Commit
4fe4f07
1 Parent(s): 617df1d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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=True, truncation=True, return_tensors="pt"
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]