Update app.py
Browse files
app.py
CHANGED
@@ -102,7 +102,14 @@ def main():
|
|
102 |
with st.expander("Show/Hide Annotation"):
|
103 |
try:
|
104 |
image = Image.open(image)
|
105 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
|