alexxxey123 commited on
Commit
665b792
·
verified ·
1 Parent(s): c583103

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -76,7 +76,7 @@ def classify_email_single_model(text, model_name):
76
  with torch.no_grad():
77
  outputs = models[model_name](**inputs)
78
  prediction = torch.argmax(outputs.logits, dim=1).item()
79
- probs = F.softmax(logits, dim=1)
80
  probs_percent = probs.cpu().numpy() * 100
81
  response = {"prediction": labels[prediction], "probabilities": probs_percent}
82
  return response
 
76
  with torch.no_grad():
77
  outputs = models[model_name](**inputs)
78
  prediction = torch.argmax(outputs.logits, dim=1).item()
79
+ probs = F.softmax(outputs.logits, dim=1)
80
  probs_percent = probs.cpu().numpy() * 100
81
  response = {"prediction": labels[prediction], "probabilities": probs_percent}
82
  return response