arkmartov commited on
Commit
795b9e0
·
1 Parent(s): fc3e0b1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -14,7 +14,7 @@ def Predict(model, tokenizer, text):
14
  res = tokenizer(text, padding=True, truncation=True, return_tensors="pt", max_length=512)
15
  res = model(**res)
16
  logits = res.logits.softmax(dim=1)
17
- logits = logits.numpy()[0]#.cpu().detach().numpy()[0]
18
  return logits
19
 
20
  def Print(logits, dictionary):
 
14
  res = tokenizer(text, padding=True, truncation=True, return_tensors="pt", max_length=512)
15
  res = model(**res)
16
  logits = res.logits.softmax(dim=1)
17
+ logits = logits.detach().numpy()[0]#.cpu().detach().numpy()[0]
18
  return logits
19
 
20
  def Print(logits, dictionary):