ki33elev commited on
Commit
beb608f
1 Parent(s): 0fbdf0a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -18,7 +18,7 @@ def predict(title, summary, tokenizer, model):
18
  text = title + "\n" + summary
19
  tokens = tokenizer.encode(text)
20
  with torch.no_grad():
21
- logits = model(torch.as_tensor([tokens], device=device))[0]
22
  probs = torch.softmax(logits[-1, :], dim=-1).data.cpu().numpy()
23
 
24
  classes = np.flip(np.argsort(probs))
 
18
  text = title + "\n" + summary
19
  tokens = tokenizer.encode(text)
20
  with torch.no_grad():
21
+ logits = model(torch.as_tensor([tokens]))[0]
22
  probs = torch.softmax(logits[-1, :], dim=-1).data.cpu().numpy()
23
 
24
  classes = np.flip(np.argsort(probs))