Oamitai commited on
Commit
b1c8777
·
verified ·
1 Parent(s): 3c6290c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -700,9 +700,9 @@ def create_gradio_interface():
700
  # Main layout
701
  with gr.Row():
702
  with gr.Column():
 
703
  input_image = gr.Image(
704
  label="Upload SET Board Image",
705
- tool="upload",
706
  type="numpy",
707
  elem_id="input-image",
708
  elem_classes="image-container"
@@ -735,13 +735,13 @@ def create_gradio_interface():
735
  examples_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "examples")
736
  os.makedirs(examples_dir, exist_ok=True)
737
 
738
- # Add examples section
739
  gr.Examples(
740
  examples=[
741
- [os.path.join(examples_dir, "set_example1.jpg")],
742
- [os.path.join(examples_dir, "set_example2.jpg")]
743
  ],
744
- inputs=[input_image],
745
  )
746
 
747
  # Footer with attribution
 
700
  # Main layout
701
  with gr.Row():
702
  with gr.Column():
703
+ # Fixed: Removed 'tool' parameter which is not supported in older Gradio versions
704
  input_image = gr.Image(
705
  label="Upload SET Board Image",
 
706
  type="numpy",
707
  elem_id="input-image",
708
  elem_classes="image-container"
 
735
  examples_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "examples")
736
  os.makedirs(examples_dir, exist_ok=True)
737
 
738
+ # Add examples section - using simpler format for compatibility
739
  gr.Examples(
740
  examples=[
741
+ os.path.join(examples_dir, "set_example1.jpg"),
742
+ os.path.join(examples_dir, "set_example2.jpg")
743
  ],
744
+ inputs=input_image
745
  )
746
 
747
  # Footer with attribution