JohanBeytell commited on
Commit
d20cafb
·
verified ·
1 Parent(s): 2587ec6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -27,16 +27,16 @@ def classify_potato_plant(img):
27
  model_output = "Early blight"
28
  elif class_labels[predicted_class] == "Potato__Late_blight":
29
  model_output = "Late blight"
30
- elif class_labels[predicted_class] == "Potate__healthy":
31
  model_output = "Healthy"
32
 
33
- return model_output, confidence
34
 
35
  # Create the Gradio interface
36
  interface = gr.Interface(
37
  fn=classify_potato_plant,
38
  inputs=gr.Image(type="pil"),
39
- outputs=[gr.Label(label="Predicted output", num_top_classes=1), gr.Textbox(label="Confidence Score")],
40
  title="Acres - PPDC",
41
  description="Acres PPDC, is our Potato Plant Disease Classification vision model, capable of accurately classifying potato plant disease, based on a single image."
42
  )
 
27
  model_output = "Early blight"
28
  elif class_labels[predicted_class] == "Potato__Late_blight":
29
  model_output = "Late blight"
30
+ elif class_labels[predicted_class] == "Potato__healthy":
31
  model_output = "Healthy"
32
 
33
+ return class_labels[predicted_class], model_output, confidence
34
 
35
  # Create the Gradio interface
36
  interface = gr.Interface(
37
  fn=classify_potato_plant,
38
  inputs=gr.Image(type="pil"),
39
+ outputs=[gr.Label(label="Predicted Classes", num_top_classes=1), gr.Textbox(label="Predicted Output"), gr.Textbox(label="Confidence Score")],
40
  title="Acres - PPDC",
41
  description="Acres PPDC, is our Potato Plant Disease Classification vision model, capable of accurately classifying potato plant disease, based on a single image."
42
  )