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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -11
app.py CHANGED
@@ -58,16 +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
- interface = gr.Interface(
62
- fn=predict,
63
- inputs=gr.Image(label="Upload the Image"),
64
- outputs=[
65
- gr.Textbox(label="Leaf Type:"), # Modified label to include the message
66
- gr.Textbox(label="Identified Disease:"),
67
- gr.Textbox(label="Percentage Breakdown (top 5):")
68
- ],
69
- title="Plant Disease Identifier",
70
- 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."
71
- )
 
72
 
73
  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
+ 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