Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -265,14 +265,14 @@ def process_satellite_images(red_file, green_file, blue_file, nir_file, batch_si
|
|
265 |
return rgb_display, visualization, stats
|
266 |
|
267 |
|
268 |
-
# Create Gradio interface
|
269 |
demo = gr.Interface(
|
270 |
fn=process_satellite_images,
|
271 |
inputs=[
|
272 |
-
gr.
|
273 |
-
gr.
|
274 |
-
gr.
|
275 |
-
gr.
|
276 |
gr.Slider(minimum=1, maximum=32, value=1, step=1, label="Batch Size", info="Higher values use more memory but process faster"),
|
277 |
gr.Slider(minimum=500, maximum=2000, value=1000, step=100, label="Patch Size", info="Size of image patches for processing"),
|
278 |
gr.Slider(minimum=100, maximum=500, value=300, step=50, label="Patch Overlap", info="Overlap between patches to avoid edge artifacts")
|
@@ -298,5 +298,6 @@ demo = gr.Interface(
|
|
298 |
["jp2s/B04.jp2", "jp2s/B03.jp2", "jp2s/B02.jp2", "jp2s/B8A.jp2", 1, 1000, 300]
|
299 |
]
|
300 |
)
|
|
|
301 |
# Launch the app
|
302 |
demo.launch(debug=True)
|
|
|
265 |
return rgb_display, visualization, stats
|
266 |
|
267 |
|
268 |
+
# Create Gradio interface with default examples
|
269 |
demo = gr.Interface(
|
270 |
fn=process_satellite_images,
|
271 |
inputs=[
|
272 |
+
gr.File(label="Red Channel (JP2)"),
|
273 |
+
gr.File(label="Green Channel (JP2)"),
|
274 |
+
gr.File(label="Blue Channel (JP2)"),
|
275 |
+
gr.File(label="NIR Channel (JP2)"),
|
276 |
gr.Slider(minimum=1, maximum=32, value=1, step=1, label="Batch Size", info="Higher values use more memory but process faster"),
|
277 |
gr.Slider(minimum=500, maximum=2000, value=1000, step=100, label="Patch Size", info="Size of image patches for processing"),
|
278 |
gr.Slider(minimum=100, maximum=500, value=300, step=50, label="Patch Overlap", info="Overlap between patches to avoid edge artifacts")
|
|
|
298 |
["jp2s/B04.jp2", "jp2s/B03.jp2", "jp2s/B02.jp2", "jp2s/B8A.jp2", 1, 1000, 300]
|
299 |
]
|
300 |
)
|
301 |
+
|
302 |
# Launch the app
|
303 |
demo.launch(debug=True)
|