Update app.py
Browse files
app.py
CHANGED
|
@@ -39,24 +39,30 @@ with gr.Blocks() as demo:
|
|
| 39 |
with gr.Row():
|
| 40 |
with gr.Column():
|
| 41 |
input_image = gr.Image(type='pil')
|
|
|
|
| 42 |
with gr.Row():
|
| 43 |
clear_btn = gr.Button("Reset")
|
| 44 |
classify_btn = gr.Button("Mehet")
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
with gr.Column():
|
| 56 |
output = gr.Label()
|
| 57 |
|
| 58 |
classify_btn.click(predict_fn, inputs=input_image, outputs=output)
|
| 59 |
clear_btn.click(lambda: [None, None], inputs=None, outputs=[input_image, output])
|
| 60 |
|
| 61 |
-
|
| 62 |
demo.launch()
|
|
|
|
| 39 |
with gr.Row():
|
| 40 |
with gr.Column():
|
| 41 |
input_image = gr.Image(type='pil')
|
| 42 |
+
|
| 43 |
with gr.Row():
|
| 44 |
clear_btn = gr.Button("Reset")
|
| 45 |
classify_btn = gr.Button("Mehet")
|
| 46 |
+
|
| 47 |
+
# Add examples section properly
|
| 48 |
+
gr.Examples(
|
| 49 |
+
examples=[
|
| 50 |
+
"imgs/lion.jpg",
|
| 51 |
+
"imgs/car.jpg",
|
| 52 |
+
"imgs/cheetah.jpg",
|
| 53 |
+
"imgs/banana.jpg",
|
| 54 |
+
"imgs/bus.jpg",
|
| 55 |
+
"imgs/parfum.jpg",
|
| 56 |
+
"imgs/alligator.jpg",
|
| 57 |
+
"imgs/arc.jpg"
|
| 58 |
+
],
|
| 59 |
+
inputs=input_image,
|
| 60 |
+
)
|
| 61 |
+
|
| 62 |
with gr.Column():
|
| 63 |
output = gr.Label()
|
| 64 |
|
| 65 |
classify_btn.click(predict_fn, inputs=input_image, outputs=output)
|
| 66 |
clear_btn.click(lambda: [None, None], inputs=None, outputs=[input_image, output])
|
| 67 |
|
|
|
|
| 68 |
demo.launch()
|