Kushwanth Chowday Kandala commited on
Commit
609ef88
1 Parent(s): 61c3232

with st.sidebar:

Browse files
Files changed (1) hide show
  1. app.py +10 -9
app.py CHANGED
@@ -155,15 +155,16 @@ def combine_text(pages):
155
 
156
  def create_embeddings():
157
  # Get the uploaded file
158
- uploaded_files = st.session_state["uploaded_files"]
159
- for uploaded_file in uploaded_files:
160
- # Read the contents of the file
161
- reader = PyPDF2.PdfReader(uploaded_file)
162
- pages = reader.pages
163
- print_out(pages)
164
- combine_text(pages)
 
165
 
166
- st.write("created_embeddings")
167
 
168
  # Display the contents of the file
169
  # st.write(file_contents)
@@ -203,7 +204,7 @@ with st.sidebar:
203
  # Can be used wherever a "file-like" object is accepted:
204
  # dataframe = pd.read_csv(uploaded_file)
205
  # st.write(dataframe)
206
-
207
  # reader = PyPDF2.PdfReader(uploaded_file)
208
  # pages = reader.pages
209
  # print_out(pages)
 
155
 
156
  def create_embeddings():
157
  # Get the uploaded file
158
+ with st.sidebar:
159
+ uploaded_files = st.session_state["uploaded_files"]
160
+ for uploaded_file in uploaded_files:
161
+ # Read the contents of the file
162
+ reader = PyPDF2.PdfReader(uploaded_file)
163
+ pages = reader.pages
164
+ print_out(pages)
165
+ combine_text(pages)
166
 
167
+ st.write("created_embeddings")
168
 
169
  # Display the contents of the file
170
  # st.write(file_contents)
 
204
  # Can be used wherever a "file-like" object is accepted:
205
  # dataframe = pd.read_csv(uploaded_file)
206
  # st.write(dataframe)
207
+
208
  # reader = PyPDF2.PdfReader(uploaded_file)
209
  # pages = reader.pages
210
  # print_out(pages)