Spaces:
Runtime error
Runtime error
Kushwanth Chowday Kandala
commited on
Commit
•
609ef88
1
Parent(s):
61c3232
with st.sidebar:
Browse files
app.py
CHANGED
@@ -155,15 +155,16 @@ def combine_text(pages):
|
|
155 |
|
156 |
def create_embeddings():
|
157 |
# Get the uploaded file
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
|
|
165 |
|
166 |
-
|
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)
|