AbhishekBhavnani commited on
Commit
b5a954c
·
verified ·
1 Parent(s): 587a46c

Solving Bug

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -21,7 +21,7 @@ if st.button("Predict"):
21
  outputs = model(**inputs)
22
  probs = F.softmax(outputs.logits, dim=-1)
23
  top = torch.argmax(probs, dim=1).item()
24
- label = model.config.id2label[str(top)]
25
  score = probs[0][top].item()
26
 
27
  st.success(f"**Prediction**: {label} ({score:.4f})")
 
21
  outputs = model(**inputs)
22
  probs = F.softmax(outputs.logits, dim=-1)
23
  top = torch.argmax(probs, dim=1).item()
24
+ label = model.config.id2label[top]
25
  score = probs[0][top].item()
26
 
27
  st.success(f"**Prediction**: {label} ({score:.4f})")