DawnC commited on
Commit
12efc89
β€’
1 Parent(s): a380e7a

Update app.py

Browse files

fixed dropdown list error

Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -56,9 +56,12 @@ else:
56
  # Gradio Interface
57
  examples = [[examples_path + "/" + img] for img in os.listdir(examples_path)]
58
 
 
 
 
59
  demo = gr.Interface(
60
  fn=classify_image,
61
- inputs=[gr.Image(type="pil"), dropdown], # drop down list
62
  outputs=[gr.Label(num_top_classes=3, label="Top 3 Predictions")],
63
  examples=examples,
64
  title='Oxford Pet πŸˆπŸ•',
 
56
  # Gradio Interface
57
  examples = [[examples_path + "/" + img] for img in os.listdir(examples_path)]
58
 
59
+ # drop down list
60
+ dropdown = gr.Dropdown(choices=class_names, label="Select a breed", type="value")
61
+
62
  demo = gr.Interface(
63
  fn=classify_image,
64
+ inputs=[gr.Image(type="pil")],
65
  outputs=[gr.Label(num_top_classes=3, label="Top 3 Predictions")],
66
  examples=examples,
67
  title='Oxford Pet πŸˆπŸ•',