hanszhu commited on
Commit
db23abc
Β·
1 Parent(s): 3b0d9c5

chore(ui): add elem_id to Gradio components; align MedSAM path with original (no auto SAM); perf tweaks

Browse files
Files changed (1) hide show
  1. app.py +8 -4
app.py CHANGED
@@ -760,26 +760,30 @@ with gr.Blocks(
760
  image_input = gr.Image(
761
  type="filepath", # βœ… REQUIRED for gradio_client
762
  label="Upload Chart Image",
763
- height=400
 
764
  )
765
 
766
  # Analyze button (single)
767
  analyze_btn = gr.Button(
768
  "πŸ” Analyze",
769
  variant="primary",
770
- size="lg"
 
771
  )
772
 
773
  with gr.Column():
774
  # Output JSON
775
  result_output = gr.JSON(
776
  label="Analysis Results",
777
- height=400
 
778
  )
779
  # Overlay image output (populated only for medical images)
780
  overlay_output = gr.Image(
781
  label="MedSAM Overlay (Medical images)",
782
- height=400
 
783
  )
784
 
785
  # Single API endpoint for JSON
 
760
  image_input = gr.Image(
761
  type="filepath", # βœ… REQUIRED for gradio_client
762
  label="Upload Chart Image",
763
+ height=400,
764
+ elem_id="image-input"
765
  )
766
 
767
  # Analyze button (single)
768
  analyze_btn = gr.Button(
769
  "πŸ” Analyze",
770
  variant="primary",
771
+ size="lg",
772
+ elem_id="analyze-btn"
773
  )
774
 
775
  with gr.Column():
776
  # Output JSON
777
  result_output = gr.JSON(
778
  label="Analysis Results",
779
+ height=400,
780
+ elem_id="result-output"
781
  )
782
  # Overlay image output (populated only for medical images)
783
  overlay_output = gr.Image(
784
  label="MedSAM Overlay (Medical images)",
785
+ height=400,
786
+ elem_id="overlay-output"
787
  )
788
 
789
  # Single API endpoint for JSON