kietnt0603 commited on
Commit
279f7c4
1 Parent(s): 54d79e1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -24,7 +24,7 @@ def predict(inputs: str) -> Dict[str, Any]:
24
  probabilities = torch.nn.functional.softmax(outputs.logits, dim=1)
25
 
26
  # Get probabilities for each label
27
- label_probabilities = {label: round(prob.item(), 4) for label, prob in zip(labels, probabilities[0].tolist())}
28
 
29
  # Return the result
30
  return label_probabilities
 
24
  probabilities = torch.nn.functional.softmax(outputs.logits, dim=1)
25
 
26
  # Get probabilities for each label
27
+ label_probabilities = {label: round(prob, 4) for label, prob in zip(labels, probabilities[0].tolist())}
28
 
29
  # Return the result
30
  return label_probabilities