Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -128,28 +128,28 @@ st.sidebar.markdown(f"### Selected Model: {Models[Lng]}")
|
|
128 |
|
129 |
|
130 |
if img_file:
|
131 |
-
|
132 |
if not realtime_update:
|
133 |
st.write("Double click to save crop")
|
134 |
|
135 |
-
col1, col2 = st.columns(2)
|
136 |
-
with col1:
|
137 |
-
|
138 |
-
# Get a cropped image from the frontend
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
|
147 |
-
with col2:
|
148 |
-
# Manipulate cropped image at will
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
|
154 |
if button:
|
155 |
with st.spinner('Running OCR...'):
|
|
|
128 |
|
129 |
|
130 |
if img_file:
|
131 |
+
cropped_img = Image.open(img_file)
|
132 |
if not realtime_update:
|
133 |
st.write("Double click to save crop")
|
134 |
|
135 |
+
# col1, col2 = st.columns(2)
|
136 |
+
# with col1:
|
137 |
+
# st.subheader("Input: Upload and Crop Your Image")
|
138 |
+
# # Get a cropped image from the frontend
|
139 |
+
# cropped_img = st_cropper(
|
140 |
+
# img,
|
141 |
+
# realtime_update=realtime_update,
|
142 |
+
# box_color="#FF0000",
|
143 |
+
# aspect_ratio=aspect_ratio,
|
144 |
+
# should_resize_image=True,
|
145 |
+
# )
|
146 |
|
147 |
+
# with col2:
|
148 |
+
# # Manipulate cropped image at will
|
149 |
+
# st.subheader("Output: Preview and Analyze")
|
150 |
+
# # _ = cropped_img.thumbnail((150, 150))
|
151 |
+
# st.image(cropped_img)
|
152 |
+
# button = st.button("Run OCR")
|
153 |
|
154 |
if button:
|
155 |
with st.spinner('Running OCR...'):
|