Update app.py
Browse files
app.py
CHANGED
@@ -305,38 +305,29 @@ with gr.Blocks(theme=gr.themes.Base()) as demo:
|
|
305 |
outputs=[location_map, analysis_text, weather_plot, score_gauge]
|
306 |
)
|
307 |
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
show_label=False
|
332 |
-
)
|
333 |
-
|
334 |
-
# Handle image analysis
|
335 |
-
analyze_image_button.click(
|
336 |
-
fn=analyze_satellite_image,
|
337 |
-
inputs=[image_input],
|
338 |
-
outputs=[image_plot, image_analysis]
|
339 |
-
)
|
340 |
|
341 |
# Launch the app
|
342 |
if __name__ == "__main__":
|
|
|
305 |
outputs=[location_map, analysis_text, weather_plot, score_gauge]
|
306 |
)
|
307 |
|
308 |
+
with gr.Tab("🛰️ Satellite Image Analysis"):
|
309 |
+
gr.Markdown("""
|
310 |
+
## Satellite Image Analysis with SAM2
|
311 |
+
Upload a satellite or aerial image to analyze vegetation health using advanced segmentation.
|
312 |
+
""")
|
313 |
+
|
314 |
+
with gr.Row():
|
315 |
+
image_input = gr.Image(
|
316 |
+
label="Upload Satellite/Aerial Image"
|
317 |
+
)
|
318 |
+
|
319 |
+
with gr.Row():
|
320 |
+
analyze_image_button = gr.Button("🔍 Analyze Image", variant="primary")
|
321 |
+
|
322 |
+
with gr.Row():
|
323 |
+
with gr.Column():
|
324 |
+
image_plot = gr.Plot(label="Vegetation Analysis Results")
|
325 |
+
with gr.Column():
|
326 |
+
image_analysis = gr.Textbox(
|
327 |
+
label="Analysis Results",
|
328 |
+
lines=10,
|
329 |
+
show_label=False
|
330 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
331 |
|
332 |
# Launch the app
|
333 |
if __name__ == "__main__":
|