Andy1621 commited on
Commit
42494b1
·
1 Parent(s): 6ab9210

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -52,7 +52,7 @@ def inference(img):
52
  pred_class_probs = [prediction[0][i.item()].item() * 100 for i in pred_classes[0]]
53
  res = "Top 5 predicted labels:\n"
54
  for name, prob in zip(pred_class_names, pred_class_probs):
55
- res += f"({prob:.4f}%)]\t{name}\n"
56
  return res
57
 
58
  inputs = gr.inputs.Image(type='pil')
 
52
  pred_class_probs = [prediction[0][i.item()].item() * 100 for i in pred_classes[0]]
53
  res = "Top 5 predicted labels:\n"
54
  for name, prob in zip(pred_class_names, pred_class_probs):
55
+ res += f"[{prob:2.2f}%]\t{name}\n"
56
  return res
57
 
58
  inputs = gr.inputs.Image(type='pil')