Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -170,7 +170,7 @@ Models = {
|
|
| 170 |
st.sidebar.markdown(f"### Selected Model: {Models[Lng]}")
|
| 171 |
|
| 172 |
if img_file:
|
| 173 |
-
if not img_file.type == "
|
| 174 |
img = Image.open(img_file)
|
| 175 |
if not realtime_update:
|
| 176 |
st.write("Double click to save crop")
|
|
@@ -214,7 +214,7 @@ if img_file:
|
|
| 214 |
st.download_button('Download Text', text_file,
|
| 215 |
file_name='ocr_text.txt')
|
| 216 |
|
| 217 |
-
elif img_file.type == "
|
| 218 |
button = st.sidebar.button("Run OCR")
|
| 219 |
|
| 220 |
if button:
|
|
|
|
| 170 |
st.sidebar.markdown(f"### Selected Model: {Models[Lng]}")
|
| 171 |
|
| 172 |
if img_file:
|
| 173 |
+
if not img_file.type == "application/pdf":
|
| 174 |
img = Image.open(img_file)
|
| 175 |
if not realtime_update:
|
| 176 |
st.write("Double click to save crop")
|
|
|
|
| 214 |
st.download_button('Download Text', text_file,
|
| 215 |
file_name='ocr_text.txt')
|
| 216 |
|
| 217 |
+
elif img_file.type == "application/pdf":
|
| 218 |
button = st.sidebar.button("Run OCR")
|
| 219 |
|
| 220 |
if button:
|