Soumen commited on
Commit
5f35583
·
1 Parent(s): 4f3134d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -94,8 +94,7 @@ def main():
94
  values = st.slider('Select a approximate number of lines to see and summarize',value=[0, len(tet)//(7*100)])
95
  st.text("Select the text from you pdf")
96
  text = tet[values[0]*7*10:values[1]*7*10] if values[0]!=len(tet)//(7*10) else tet[len(tet)//(7*100):]
97
- if st.checkbox("Show the selected text:"):
98
- st.success(text)
99
  st.text("summarized text: ")
100
  engsum(text)
101
  if uploaded_photo and uploaded_photo.type !='application/pdf':
@@ -104,10 +103,10 @@ def main():
104
  img = img.save("img.png")
105
  img = cv2.imread("img.png")
106
  st.text("Select the summarization type:")
107
- if st.button("Bangla"):
108
  text = pytesseract.image_to_string(img, lang="ben")
109
  bansum(text)
110
- if st.button("English"):
111
  text=pytesseract.image_to_string(img)
112
  engsum(text)
113
  #st.success(text)
 
94
  values = st.slider('Select a approximate number of lines to see and summarize',value=[0, len(tet)//(7*100)])
95
  st.text("Select the text from you pdf")
96
  text = tet[values[0]*7*10:values[1]*7*10] if values[0]!=len(tet)//(7*10) else tet[len(tet)//(7*100):]
97
+ st.success(text)
 
98
  st.text("summarized text: ")
99
  engsum(text)
100
  if uploaded_photo and uploaded_photo.type !='application/pdf':
 
103
  img = img.save("img.png")
104
  img = cv2.imread("img.png")
105
  st.text("Select the summarization type:")
106
+ if st.button("BENGALI"):
107
  text = pytesseract.image_to_string(img, lang="ben")
108
  bansum(text)
109
+ if st.button("ENGLISH"):
110
  text=pytesseract.image_to_string(img)
111
  engsum(text)
112
  #st.success(text)