Soumen commited on
Commit
4c1b17d
·
1 Parent(s): 0d9c3fb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -2
app.py CHANGED
@@ -123,7 +123,6 @@ def main():
123
  if "photo" not in st.session_state:
124
  st.session_state["photo"]="not done"
125
  if st.session_state["photo"]=="done" or message:
126
- text=" "
127
  if uploaded_photo.type=='application/pdf':
128
  #file = uploaded_photo.read() # Read the data
129
  #image_result = open(uploaded_photo.name, 'wb') # creates a writable image and later we can write the decoded result
@@ -133,7 +132,6 @@ def main():
133
  values = st.slider('Select a approximate number of lines to see and summarize',value=[0, len(tet)//(7*10)])
134
  text = tet[values[0]*7*10:values[1]*7*10] if values[0]!=len(tet)//(7*10) else tet[len(tet)//(7*10):]
135
  st.success(text)
136
-
137
  elif uploaded_photo.type == "application/image":
138
  img = Image.open(uploaded_photo)
139
  img = img.save("img.png")
 
123
  if "photo" not in st.session_state:
124
  st.session_state["photo"]="not done"
125
  if st.session_state["photo"]=="done" or message:
 
126
  if uploaded_photo.type=='application/pdf':
127
  #file = uploaded_photo.read() # Read the data
128
  #image_result = open(uploaded_photo.name, 'wb') # creates a writable image and later we can write the decoded result
 
132
  values = st.slider('Select a approximate number of lines to see and summarize',value=[0, len(tet)//(7*10)])
133
  text = tet[values[0]*7*10:values[1]*7*10] if values[0]!=len(tet)//(7*10) else tet[len(tet)//(7*10):]
134
  st.success(text)
 
135
  elif uploaded_photo.type == "application/image":
136
  img = Image.open(uploaded_photo)
137
  img = img.save("img.png")