Soumen commited on
Commit
b6fbd57
·
1 Parent(s): 07c7d3a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -92,16 +92,14 @@ def main():
92
  #image_result.write(file)
93
  tet = read_pdf(uploaded_photo)
94
  #tet = pytesseract.image_to_string(img, lang="ben") if st.checkbox("Mark to see Bangla Image's Text") else pytesseract.image_to_string(img)
 
 
95
  st.text("Selected text for summarize: ")
96
  if st.button("BENGALI"):
97
- values = st.slider('Select a approximate number of lines to see and summarize',value=[0, len(tet)//(7*100)])
98
- text = tet[values[0]*7*10:values[1]*7*100] if values[0]!=len(tet)//(7*100) else tet[len(tet)//(7*100):]
99
  st.success(text)
100
  st.text("Summarized text: ")
101
  bansum(text)
102
  if st.button("ENGLISH"):
103
- values = st.slider('Select a approximate number of lines to see and summarize',value=[0, len(tet)//(7*100)])
104
- text = tet[values[0]*7*10:values[1]*7*100] if values[0]!=len(tet)//(7*100) else tet[len(tet)//(7*100):]
105
  st.success(text)
106
  st.text("Summarized text: ")
107
  engsum(text)
 
92
  #image_result.write(file)
93
  tet = read_pdf(uploaded_photo)
94
  #tet = pytesseract.image_to_string(img, lang="ben") if st.checkbox("Mark to see Bangla Image's Text") else pytesseract.image_to_string(img)
95
+ values = st.slider('Select a approximate number of lines to see and summarize',value=[0, len(tet)//(7*100)])
96
+ text = tet[values[0]*7*10:values[1]*7*100] if values[0]!=len(tet)//(7*100) else tet[len(tet)//(7*100):]
97
  st.text("Selected text for summarize: ")
98
  if st.button("BENGALI"):
 
 
99
  st.success(text)
100
  st.text("Summarized text: ")
101
  bansum(text)
102
  if st.button("ENGLISH"):
 
 
103
  st.success(text)
104
  st.text("Summarized text: ")
105
  engsum(text)