NoChromo commited on
Commit
a9fb7f7
1 Parent(s): 8b59e73

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -12
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
- with gr.Blocks(theme='gradio/glass') as interface:
62
- gr.Interface(
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
 
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