gagan3012 commited on
Commit
5cf7a29
·
1 Parent(s): e8ffddc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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 == ".pdf":
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 == ".pdf":
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: