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

Update app.py

Browse files

add drop down list

Files changed (1) hide show
  1. app.py +9 -7
app.py CHANGED
@@ -56,12 +56,14 @@ else:
56
  # Gradio Interface
57
  examples = [[examples_path + "/" + img] for img in os.listdir(examples_path)]
58
 
59
- demo = gr.Interface(fn=classify_image,
60
- inputs=gr.Image(type="pil"),
61
- outputs=[gr.Label(num_top_classes=3, label="Top 3 Predictions")],
62
- examples=examples,
63
- title='Oxford Pet πŸˆπŸ•',
64
- description='A ResNet50-based model for classifying 37 different pet breeds.',
65
- article='https://github.com/Eric-Chung-0511/Learning-Record/tree/main/Data%20Science%20Projects/The%20Oxford-IIIT%20Pet%20Project')
 
 
66
 
67
  demo.launch()
 
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 πŸˆπŸ•',
65
+ description='A ResNet50-based model for classifying 37 different pet breeds.',
66
+ article='[Oxford Project](https://github.com/Eric-Chung-0511/Learning-Record/tree/main/Data%20Science%20Projects/The%20Oxford-IIIT%20Pet%20Project)'
67
+ )
68
 
69
  demo.launch()