saim1309 commited on
Commit
8facb11
·
verified ·
1 Parent(s): b25313e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -1
app.py CHANGED
@@ -401,10 +401,18 @@ def process_image(image, left_frac):
401
  result = visualize(img_bgr, left, right_with_synth, mapping)
402
  return result
403
 
 
404
  # ----------------- Gradio App -----------------
405
  title = "Grid Detection & Matching Viewer"
406
  description = "Upload an image, adjust the Left/Right threshold, and view final matching visualization."
407
 
 
 
 
 
 
 
 
408
  iface = gr.Interface(
409
  fn=process_image,
410
  inputs=[
@@ -414,8 +422,9 @@ iface = gr.Interface(
414
  outputs=gr.Image(label="Matched Output", type="numpy"),
415
  title=title,
416
  description=description,
417
- examples=None
418
  )
419
 
420
  if __name__ == "__main__":
421
  iface.launch()
 
 
401
  result = visualize(img_bgr, left, right_with_synth, mapping)
402
  return result
403
 
404
+ # ----------------- Gradio App -----------------
405
  # ----------------- Gradio App -----------------
406
  title = "Grid Detection & Matching Viewer"
407
  description = "Upload an image, adjust the Left/Right threshold, and view final matching visualization."
408
 
409
+ # Add example images (place them in the same folder or give full paths)
410
+ examples = [
411
+ ["2.png", 0.28],
412
+ ["5.jpg", 0.35],
413
+ ["examples/sample3.jpg", 0.35],
414
+ ]
415
+
416
  iface = gr.Interface(
417
  fn=process_image,
418
  inputs=[
 
422
  outputs=gr.Image(label="Matched Output", type="numpy"),
423
  title=title,
424
  description=description,
425
+ examples=examples # ✅ Add examples here
426
  )
427
 
428
  if __name__ == "__main__":
429
  iface.launch()
430
+