danielritchie commited on
Commit
82257b6
·
verified ·
1 Parent(s): 0b1291e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
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
- # Examples section at the top
 
 
 
 
 
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,