0-ma commited on
Commit
657b87f
·
verified ·
1 Parent(s): 4f2203a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -10
app.py CHANGED
@@ -53,19 +53,18 @@ with gr.Blocks() as demo:
53
  gr.Markdown(description)
54
 
55
  with gr.Row():
56
- model_dropdown = gr.Dropdown(choices=model_names, label="Select Model", value=model_names[0])
57
- image_input = gr.Image(type="pil")
 
 
 
 
 
 
 
58
 
59
  output = gr.Label()
60
 
61
- gr.Examples(
62
- examples=example_images,
63
- inputs=image_input,
64
- outputs=output,
65
- fn=lambda img: predict(img, model_dropdown.value),
66
- cache_examples=True,
67
- )
68
-
69
  image_input.change(fn=lambda img: predict(img, model_dropdown.value), inputs=[image_input], outputs=output)
70
  model_dropdown.change(fn=lambda img, model: predict(img, model), inputs=[image_input, model_dropdown], outputs=output)
71
 
 
53
  gr.Markdown(description)
54
 
55
  with gr.Row():
56
+ model_dropdown = gr.Dropdown(choices=model_names, label="Selected Model", value=model_names[0])
57
+ gr.Examples(
58
+ examples=example_images,
59
+ inputs=image_input,
60
+ outputs=output,
61
+ fn=lambda img: predict(img, model_dropdown.value),
62
+ cache_examples=True,
63
+ )
64
+ image_input = gr.Image(type="pil")
65
 
66
  output = gr.Label()
67
 
 
 
 
 
 
 
 
 
68
  image_input.change(fn=lambda img: predict(img, model_dropdown.value), inputs=[image_input], outputs=output)
69
  model_dropdown.change(fn=lambda img, model: predict(img, model), inputs=[image_input, model_dropdown], outputs=output)
70