Soumen commited on
Commit
431e456
·
1 Parent(s): ea8c799

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -133,9 +133,10 @@ def main():
133
  #image_result.write(file)
134
  tet = read_pdf(uploaded_photo)
135
  #tet = pytesseract.image_to_string(img, lang="ben") if st.checkbox("Mark to see Bangla Image's Text") else pytesseract.image_to_string(img)
136
- values = st.slider('Select a approximate number of words to summarize', 0, 1000, (100, 775))
137
- text = tet[:values*5]
138
- st.success(text)
 
139
 
140
  elif uploaded_photo.type != "application/image":
141
  img = Image.open(uploaded_photo)
 
133
  #image_result.write(file)
134
  tet = read_pdf(uploaded_photo)
135
  #tet = pytesseract.image_to_string(img, lang="ben") if st.checkbox("Mark to see Bangla Image's Text") else pytesseract.image_to_string(img)
136
+ values = st.slider('Select a approximate number of words to view and summarize', 0, 1000, (100, 775))
137
+ if values:
138
+ text = tet[:values*5]
139
+ st.success(text)
140
 
141
  elif uploaded_photo.type != "application/image":
142
  img = Image.open(uploaded_photo)