Soumen commited on
Commit
c745dc1
·
1 Parent(s): 37287e0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -98,7 +98,7 @@ def main():
98
  st.success(text)
99
  st.text("Summarized text: ")
100
  engsum(text)
101
- if uploaded_photo and uploaded_photo.type !='application/pdf':
102
  text=None
103
  img = Image.open(uploaded_photo)
104
  img = img.save("img.png")
@@ -111,7 +111,7 @@ def main():
111
  text=pytesseract.image_to_string(img)
112
  engsum(text)
113
  #st.success(text)
114
- if camera_photo:
115
  text=None
116
  img = Image.open(camera_photo)
117
  img = img.save("img.png")
@@ -124,7 +124,7 @@ def main():
124
  if st.button("English"):
125
  text=pytesseract.image_to_string(img)
126
  engsum(text)
127
- if message:
128
  text=None
129
  text = message
130
  if st.button("Bangla"):
 
98
  st.success(text)
99
  st.text("Summarized text: ")
100
  engsum(text)
101
+ elif uploaded_photo and uploaded_photo.type !='application/pdf':
102
  text=None
103
  img = Image.open(uploaded_photo)
104
  img = img.save("img.png")
 
111
  text=pytesseract.image_to_string(img)
112
  engsum(text)
113
  #st.success(text)
114
+ elif camera_photo:
115
  text=None
116
  img = Image.open(camera_photo)
117
  img = img.save("img.png")
 
124
  if st.button("English"):
125
  text=pytesseract.image_to_string(img)
126
  engsum(text)
127
+ else:
128
  text=None
129
  text = message
130
  if st.button("Bangla"):