Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -57,7 +57,9 @@ title = "Clothing Identifier"
|
|
57 |
|
58 |
def classify_image(img):
|
59 |
pred, idx, probs = learn.predict(img)
|
60 |
-
|
|
|
|
|
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(
|