andrewzamp commited on
Commit
e93a56e
·
1 Parent(s): 6dc0dcd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -4
app.py CHANGED
@@ -99,10 +99,15 @@ def make_prediction(image, taxonomic_level):
99
 
100
  # Define the Gradio interface
101
  interface = gr.Interface(
102
- fn=make_prediction, # Function to be called for predictions
103
- inputs=[gr.Image(type="pil", label="Upload Image"), # Input type: Image (PIL format)
104
- gr.Dropdown(choices=taxonomic_levels, label="Taxonomic level", value="species")], # Dropdown for taxonomic level
105
- outputs="html", # Output type: HTML for formatting
 
 
 
 
 
106
  title="Amazon arboreal species classification",
107
  description="Upload an image and select the taxonomic level to classify the species."
108
  )
 
99
 
100
  # Define the Gradio interface
101
  interface = gr.Interface(
102
+ fn=make_prediction, # Function to be called for predictions
103
+ inputs=[
104
+ gr.Image(type="pil", label="Upload Image"), # Input type: Image (PIL format)
105
+ gr.Radio(choices=["Yes, I want to specify the taxonomic level", "No, I will let the model decide"],
106
+ label="Do you want to specify the taxonomic resolution for predictions?",
107
+ value="No, I will let the model decide"), # Radio button for taxonomic resolution choice
108
+ gr.Dropdown(choices=taxonomic_levels, label="Taxonomic level", value="species") # Dropdown for taxonomic level
109
+ ],
110
+ outputs="html", # Output type: HTML for formatting
111
  title="Amazon arboreal species classification",
112
  description="Upload an image and select the taxonomic level to classify the species."
113
  )