Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -13,10 +13,11 @@ def maize_disease_classifier(image):
|
|
13 |
pred,pred_idx,probs = learn_inf.predict(image)
|
14 |
pred_name = f"Prediction: {pred}"
|
15 |
pred_prob = f"Probability: {probs[pred_idx]}"
|
16 |
-
|
|
|
17 |
|
18 |
|
19 |
iface = gr.Interface(fn=maize_disease_classifier, inputs=gr.inputs.Image(shape=(224, 224)), \
|
20 |
-
outputs=["text", "number"])
|
21 |
|
22 |
iface.launch(inline=False)
|
|
|
13 |
pred,pred_idx,probs = learn_inf.predict(image)
|
14 |
pred_name = f"Prediction: {pred}"
|
15 |
pred_prob = f"Probability: {probs[pred_idx]}"
|
16 |
+
pred_array = pred_idx
|
17 |
+
return pred_name, pred_prob, pred_array
|
18 |
|
19 |
|
20 |
iface = gr.Interface(fn=maize_disease_classifier, inputs=gr.inputs.Image(shape=(224, 224)), \
|
21 |
+
outputs=["text", "number", "text"])
|
22 |
|
23 |
iface.launch(inline=False)
|