BorisEm Claude commited on
Commit
67aaece
·
1 Parent(s): 3133830

Restrict input to file upload only

Browse files

- Added sources=['upload'] to input image component
- Disabled webcam and clipboard paste options
- Set output image to interactive=False for cleaner interface
- Focuses user experience on satellite image file uploads

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

Files changed (1) hide show
  1. app.py +12 -2
app.py CHANGED
@@ -757,10 +757,20 @@ with gr.Blocks(css=css, title="HAT Super-Resolution for Satellite Images") as if
757
 
758
  with gr.Row():
759
  with gr.Column():
760
- input_image = gr.Image(type="pil", label="Input Satellite Image", elem_classes="image-container")
 
 
 
 
 
761
 
762
  with gr.Column():
763
- output_image = gr.Image(type="pil", label="Enhanced Output (4x Super-Resolution)", elem_classes="image-container")
 
 
 
 
 
764
 
765
  submit_btn = gr.Button("Enhance Image", variant="primary")
766
 
 
757
 
758
  with gr.Row():
759
  with gr.Column():
760
+ input_image = gr.Image(
761
+ type="pil",
762
+ label="Input Satellite Image",
763
+ elem_classes="image-container",
764
+ sources=["upload"]
765
+ )
766
 
767
  with gr.Column():
768
+ output_image = gr.Image(
769
+ type="pil",
770
+ label="Enhanced Output (4x Super-Resolution)",
771
+ elem_classes="image-container",
772
+ interactive=False
773
+ )
774
 
775
  submit_btn = gr.Button("Enhance Image", variant="primary")
776