eagle0504 commited on
Commit
ed84011
·
verified ·
1 Parent(s): 08a61a8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -102,7 +102,14 @@ def main():
102
  with st.expander("Show/Hide Annotation"):
103
  try:
104
  image = Image.open(image)
105
- draw_bounding_boxes_for_textract(image.copy(), result_dict)
 
 
 
 
 
 
 
106
  except:
107
  st.warning("Check textract output!")
108
 
 
102
  with st.expander("Show/Hide Annotation"):
103
  try:
104
  image = Image.open(image)
105
+
106
+ # Draw bounding boxes and labels
107
+ image_with_boxes = draw_bounding_boxes_for_textract(image.copy(), result_dict)
108
+ st.success("Bounding boxes drawn.")
109
+
110
+ # Display annotated image
111
+ st.image(image_with_boxes, caption="Annotated Image", use_column_width=True)
112
+
113
  except:
114
  st.warning("Check textract output!")
115