Soumen commited on
Commit
ac35f7a
1 Parent(s): 2e3a776

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -132,14 +132,15 @@ def main():
132
  img = img.save("img.png")
133
  img = cv2.imread("img.png")
134
  st.text("Select the summarization type:")
135
- st.success(text)
136
  c4, c5 = st.columns([1,7])
137
  if c4.button("BENGALI"):
138
  text = pytesseract.image_to_string(img, lang="ben")
 
139
  st.subheader("সারাংশ/সারমর্ম")
140
  bansum(text)
141
  if c5.button("ENGLISH"):
142
  text=pytesseract.image_to_string(img)
 
143
  st.subheader("Summarized Text")
144
  engsum(text)
145
  elif camera_photo:
@@ -149,14 +150,16 @@ def main():
149
  img = cv2.imread("img.png")
150
  #text = pytesseract.image_to_string(img) if st.checkbox("Bangla") else pytesseract.image_to_string(img, lang="ben")
151
  st.text("Select the summarization type:")
152
- st.image(camera_photo, caption='Uploaded Image', use_column_width=True)
153
  c6, c7 = st.columns([1,7])
154
  if c6.button("Bangla"):
155
  text = pytesseract.image_to_string(img, lang="ben")
 
156
  st.subheader("সারাংশ/সারমর্ম")
157
  bansum(text)
158
  if c7.button("English"):
159
  text=pytesseract.image_to_string(img)
 
160
  st.subheader("Summarized Text")
161
  engsum(text)
162
  else:
 
132
  img = img.save("img.png")
133
  img = cv2.imread("img.png")
134
  st.text("Select the summarization type:")
 
135
  c4, c5 = st.columns([1,7])
136
  if c4.button("BENGALI"):
137
  text = pytesseract.image_to_string(img, lang="ben")
138
+ st.success(text)
139
  st.subheader("সারাংশ/সারমর্ম")
140
  bansum(text)
141
  if c5.button("ENGLISH"):
142
  text=pytesseract.image_to_string(img)
143
+ st.success(text)
144
  st.subheader("Summarized Text")
145
  engsum(text)
146
  elif camera_photo:
 
150
  img = cv2.imread("img.png")
151
  #text = pytesseract.image_to_string(img) if st.checkbox("Bangla") else pytesseract.image_to_string(img, lang="ben")
152
  st.text("Select the summarization type:")
153
+ #st.image(camera_photo, caption='Uploaded Image', use_column_width=True)
154
  c6, c7 = st.columns([1,7])
155
  if c6.button("Bangla"):
156
  text = pytesseract.image_to_string(img, lang="ben")
157
+ st.success(text)
158
  st.subheader("সারাংশ/সারমর্ম")
159
  bansum(text)
160
  if c7.button("English"):
161
  text=pytesseract.image_to_string(img)
162
+ st.success(text)
163
  st.subheader("Summarized Text")
164
  engsum(text)
165
  else: