Commit
•
9da9b42
1
Parent(s):
fc5c4f6
Update app.py
Browse files
app.py
CHANGED
@@ -43,15 +43,7 @@ def predict(image):
|
|
43 |
|
44 |
# Create the Gradio interface
|
45 |
|
46 |
-
|
47 |
-
|
48 |
-
img1 = gr.Image(value="maladie_du_dragon_jaune.jpg", elem_id="img1")
|
49 |
-
img2 = gr.Image(value="mineuse_des_agrumes.jpg", elem_id="img2")
|
50 |
|
51 |
-
|
52 |
-
input_img = gr.Image(type="pil", label="Upload an image of a citrus leaf to classify its disease. The model is trained on the following diseases: Aleurocanthus spiniferus, Chancre citrique, Cochenille blanche, Dépérissement des agrumes, Feuille saine, Jaunissement des feuilles, Maladie de l'oïdium, Maladie du dragon jaune, Mineuse des agrumes, Trou de balle.")
|
53 |
-
output = gr.Textbox(label="Prediction")
|
54 |
-
btn = gr.Button("Classify")
|
55 |
-
btn.click(fn=predict, inputs=input_img, outputs=output)
|
56 |
-
|
57 |
-
demo.launch(share=True)
|
|
|
43 |
|
44 |
# Create the Gradio interface
|
45 |
|
46 |
+
image = gr.Image(type="pil")
|
47 |
+
label = gr.Textbox(label="Prediction")
|
|
|
|
|
48 |
|
49 |
+
gr.Interface(fn=predict, inputs="image", outputs="text", title="Citrus Disease Classification", description="Upload an image of a citrus leaf to classify its disease. The model is trained on the following diseases: Aleurocanthus spiniferus, Chancre citrique, Cochenille blanche, Dépérissement des agrumes, Feuille saine, Jaunissement des feuilles, Maladie de l'oïdium, Maladie du dragon jaune, Mineuse des agrumes, Trou de balle.",examples=["maladie_du_dragon_jaune.jpg", "mineuse_des_agrumes.jpg"])).launch(share=True)
|
|
|
|
|
|
|
|
|
|
|
|