Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -16,6 +16,18 @@ st.set_page_config(page_title="RAG Demo - Evan Perez", layout ="wide")
|
|
16 |
api_key = 'AIzaSyCvXRggpO2yNwIpZmoMy_5Xhm2bDyD-pOo'
|
17 |
|
18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
def get_pdf_text(pdf_docs):
|
20 |
text = ""
|
21 |
for pdf in pdf_docs:
|
|
|
16 |
api_key = 'AIzaSyCvXRggpO2yNwIpZmoMy_5Xhm2bDyD-pOo'
|
17 |
|
18 |
|
19 |
+
os.mkdir('faiss_index')
|
20 |
+
|
21 |
+
import subprocess
|
22 |
+
|
23 |
+
# Read requirements.txt file
|
24 |
+
with open('requirements.txt', 'r') as f:
|
25 |
+
packages = f.read().splitlines()
|
26 |
+
|
27 |
+
# Install packages
|
28 |
+
for package in packages:
|
29 |
+
subprocess.call(['pip', 'install', package])
|
30 |
+
|
31 |
def get_pdf_text(pdf_docs):
|
32 |
text = ""
|
33 |
for pdf in pdf_docs:
|