Update app.py
Browse files
app.py
CHANGED
@@ -67,7 +67,12 @@ with gr.Blocks() as iface:
|
|
67 |
gr.Markdown("Compare standard YOLOv8 model (left) with Fine-tuned model (right)")
|
68 |
|
69 |
with gr.Column():
|
70 |
-
#
|
|
|
|
|
|
|
|
|
|
|
71 |
gr.Examples(
|
72 |
examples=[["test_image.jpg"]],
|
73 |
inputs=input_image,
|
@@ -75,10 +80,6 @@ with gr.Blocks() as iface:
|
|
75 |
fn=compare_models,
|
76 |
cache_examples=True
|
77 |
)
|
78 |
-
|
79 |
-
input_image = gr.Image(type="pil", label="Input Image", height=200)
|
80 |
-
submit_btn = gr.Button("Compare Models")
|
81 |
-
output_image = gr.Image(type="numpy", label="Comparison Result", height=400)
|
82 |
|
83 |
submit_btn.click(
|
84 |
fn=compare_models,
|
|
|
67 |
gr.Markdown("Compare standard YOLOv8 model (left) with Fine-tuned model (right)")
|
68 |
|
69 |
with gr.Column():
|
70 |
+
# First define the input and output components
|
71 |
+
input_image = gr.Image(type="pil", label="Input Image", height=200)
|
72 |
+
submit_btn = gr.Button("Compare Models")
|
73 |
+
output_image = gr.Image(type="numpy", label="Comparison Result", height=400)
|
74 |
+
|
75 |
+
# Then add Examples section that references them
|
76 |
gr.Examples(
|
77 |
examples=[["test_image.jpg"]],
|
78 |
inputs=input_image,
|
|
|
80 |
fn=compare_models,
|
81 |
cache_examples=True
|
82 |
)
|
|
|
|
|
|
|
|
|
83 |
|
84 |
submit_btn.click(
|
85 |
fn=compare_models,
|