lyimo commited on
Commit
2ebb842
·
verified ·
1 Parent(s): c4ab81d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +23 -32
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
- 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
- type="file",
318
- tool="select"
319
- )
320
-
321
- with gr.Row():
322
- analyze_image_button = gr.Button("🔍 Analyze Image", variant="primary")
323
-
324
- with gr.Row():
325
- with gr.Column():
326
- image_plot = gr.Plot(label="Vegetation Analysis Results")
327
- with gr.Column():
328
- image_analysis = gr.Textbox(
329
- label="Analysis Results",
330
- lines=10,
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__":