Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -58,17 +58,17 @@ def predict(image):
|
|
58 |
return leaf_category.capitalize(), disease_name.replace('_', ' ').capitalize(), formatted_percentage
|
59 |
|
60 |
# Gradio interface setup with separate boxes for Leaf Type, Identified Disease, and Percentage Breakdown
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
|
74 |
interface.launch(debug=True) # Start server and launch the UI
|
|
|
58 |
return leaf_category.capitalize(), disease_name.replace('_', ' ').capitalize(), formatted_percentage
|
59 |
|
60 |
# Gradio interface setup with separate boxes for Leaf Type, Identified Disease, and Percentage Breakdown
|
61 |
+
interface = gr.Interface(
|
62 |
+
theme = 'gradio/glass',
|
63 |
+
fn=predict,
|
64 |
+
inputs=gr.Image(label="Upload the Image"),
|
65 |
+
outputs=[
|
66 |
+
gr.Textbox(label="Leaf Type:"), # Modified label to include the message
|
67 |
+
gr.Textbox(label="Identified Disease:"),
|
68 |
+
gr.Textbox(label="Percentage Breakdown (top 5):")
|
69 |
+
],
|
70 |
+
title="Plant Disease Identifier",
|
71 |
+
description="Quick Tip: If the image results do not match, consider taking a picture of the leaf against a clean white background for improved accuracy and better identification of plant diseases."
|
72 |
+
)
|
73 |
|
74 |
interface.launch(debug=True) # Start server and launch the UI
|