Phauglin commited on
Commit
6200397
·
verified ·
1 Parent(s): 5c93b6c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -71,7 +71,7 @@ learn = load_learner('export.pkl')
71
  # Create Gradio interface
72
  with gr.Blocks() as demo:
73
  with gr.Row():
74
- input_image = gr.Image(height=192, width=192, label="Upload Image for Classification")
75
  with gr.Row():
76
  with gr.Column():
77
  label_output = gr.Label(label="Classification Results")
@@ -83,7 +83,13 @@ with gr.Blocks() as demo:
83
  'https://www.deserthorizonnursery.com/wp-content/uploads/2024/03/Brittlebush-Encelia-Farinosa-desert-horizon-nursery.jpg',
84
  'https://cdn.mos.cms.futurecdn.net/VJE7gSuQ9KWbkqEsWgX5zS.jpg'
85
  ]
86
- gr.Examples(examples, input_image)
 
 
 
 
 
 
87
 
88
  # Set up event handler
89
  input_image.change(
 
71
  # Create Gradio interface
72
  with gr.Blocks() as demo:
73
  with gr.Row():
74
+ input_image = gr.Image(height=192, width=192, label="Upload Image for Classification", type="pil")
75
  with gr.Row():
76
  with gr.Column():
77
  label_output = gr.Label(label="Classification Results")
 
83
  'https://www.deserthorizonnursery.com/wp-content/uploads/2024/03/Brittlebush-Encelia-Farinosa-desert-horizon-nursery.jpg',
84
  'https://cdn.mos.cms.futurecdn.net/VJE7gSuQ9KWbkqEsWgX5zS.jpg'
85
  ]
86
+ gr.Examples(
87
+ examples=examples,
88
+ inputs=input_image,
89
+ examples_per_page=5,
90
+ fn=process_image,
91
+ outputs=[label_output, generated_image, wiki_output]
92
+ )
93
 
94
  # Set up event handler
95
  input_image.change(