Soumen commited on
Commit
55ef2c3
·
1 Parent(s): b005f52

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -133,12 +133,16 @@ def main():
133
  values = st.slider('Select a approximate number of words to view and summarize', 0, 500,1000)
134
  tl = len(tet)
135
  i=0
 
136
  if values:
137
  if st.button("See_Next"):
138
- if i<=tl//(values*5):
 
139
  text = tet[i*(values*5):] if i==tl//(values*5) else tet[i*(values*5):(i+1)*(values*5)]
140
- i+=1
141
  st.success(text)
 
 
 
142
 
143
  elif uploaded_photo.type != "application/image":
144
  img = Image.open(uploaded_photo)
 
133
  values = st.slider('Select a approximate number of words to view and summarize', 0, 500,1000)
134
  tl = len(tet)
135
  i=0
136
+ j=0
137
  if values:
138
  if st.button("See_Next"):
139
+ while(i<=tl//(values*5)):
140
+ i=j
141
  text = tet[i*(values*5):] if i==tl//(values*5) else tet[i*(values*5):(i+1)*(values*5)]
 
142
  st.success(text)
143
+ i+=1
144
+ j=i
145
+ break
146
 
147
  elif uploaded_photo.type != "application/image":
148
  img = Image.open(uploaded_photo)