danielritchie commited on
Commit
99b45ec
·
verified ·
1 Parent(s): accfa62

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -0
app.py CHANGED
@@ -67,9 +67,21 @@ with gr.Blocks() as iface:
67
  gr.Markdown("Compare standard YOLOv8 model (left) with Fine-tuned model (right)")
68
 
69
  with gr.Column():
 
 
 
70
  input_image = gr.Image(type="pil", label="Input Image", height=200)
71
  submit_btn = gr.Button("Compare Models")
72
  output_image = gr.Image(type="numpy", label="Comparison Result", height=400)
 
 
 
 
 
 
 
 
 
73
 
74
  submit_btn.click(
75
  fn=compare_models,
 
67
  gr.Markdown("Compare standard YOLOv8 model (left) with Fine-tuned model (right)")
68
 
69
  with gr.Column():
70
+ # Add example image thumbnail
71
+ gr.Image("test_image.jpg", label="Example Image", height=100, interactive=False)
72
+
73
  input_image = gr.Image(type="pil", label="Input Image", height=200)
74
  submit_btn = gr.Button("Compare Models")
75
  output_image = gr.Image(type="numpy", label="Comparison Result", height=400)
76
+
77
+ # Add example functionality
78
+ gr.Examples(
79
+ examples=[["test_image.jpg"]],
80
+ inputs=input_image,
81
+ outputs=output_image,
82
+ fn=compare_models,
83
+ cache_examples=True
84
+ )
85
 
86
  submit_btn.click(
87
  fn=compare_models,