adamlu1 commited on
Commit
10c876c
2 Parent(s): b35e1d0 ba1b787

Merge remote-tracking branch 'refs/remotes/origin/main' into main

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -69,7 +69,8 @@ def process(
69
  image = Image.open(io.BytesIO(base64.b64decode(dino_labled_img)))
70
  print('finish processing')
71
  parsed_content_list = '\n'.join(parsed_content_list)
72
- return image, str(parsed_content_list)
 
73
 
74
 
75
 
@@ -90,6 +91,7 @@ with gr.Blocks() as demo:
90
  with gr.Column():
91
  image_output_component = gr.Image(type='pil', label='Image Output')
92
  text_output_component = gr.Textbox(label='Parsed screen elements', placeholder='Text Output')
 
93
 
94
  submit_button_component.click(
95
  fn=process,
@@ -98,7 +100,7 @@ with gr.Blocks() as demo:
98
  box_threshold_component,
99
  iou_threshold_component
100
  ],
101
- outputs=[image_output_component, text_output_component]
102
  )
103
 
104
  # demo.launch(debug=False, show_error=True, share=True)
 
69
  image = Image.open(io.BytesIO(base64.b64decode(dino_labled_img)))
70
  print('finish processing')
71
  parsed_content_list = '\n'.join(parsed_content_list)
72
+ label_coordinates_str = label_coordinates
73
+ return image, str(parsed_content_list), str(label_coordinates)
74
 
75
 
76
 
 
91
  with gr.Column():
92
  image_output_component = gr.Image(type='pil', label='Image Output')
93
  text_output_component = gr.Textbox(label='Parsed screen elements', placeholder='Text Output')
94
+ coordinates_output_component = gr.Textbox(label='Coordinates', placeholder='Coordinates Output')
95
 
96
  submit_button_component.click(
97
  fn=process,
 
100
  box_threshold_component,
101
  iou_threshold_component
102
  ],
103
+ outputs=[image_output_component, text_output_component, coordinates_output_component]
104
  )
105
 
106
  # demo.launch(debug=False, show_error=True, share=True)