NKASG commited on
Commit
fb53d2e
·
verified ·
1 Parent(s): 440597a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -57,7 +57,9 @@ title = "Clothing Identifier"
57
 
58
  def classify_image(img):
59
  pred, idx, probs = learn.predict(img)
60
- return dict(zip(categories, map(float, probs)))
 
 
61
 
62
 
63
  iface = gr.Interface(
 
57
 
58
  def classify_image(img):
59
  pred, idx, probs = learn.predict(img)
60
+ highest_prob_index = probs.argmax() # Find the index of the highest probability
61
+ return categories[highest_prob_index] # Return the class with the highest probability
62
+
63
 
64
 
65
  iface = gr.Interface(