Spaces:
Running
Running
ryanrwatkins
commited on
Commit
•
37c02da
1
Parent(s):
593b0fe
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ import os
|
|
6 |
import langchain
|
7 |
import chromadb
|
8 |
import glob
|
9 |
-
|
10 |
|
11 |
from PyPDF2 import PdfReader
|
12 |
from PyPDF2 import PdfWriter
|
@@ -229,11 +229,11 @@ with gr.Blocks(css=css) as demo:
|
|
229 |
|
230 |
|
231 |
with gr.Column(elem_id="col-container"):
|
232 |
-
|
233 |
-
|
234 |
|
235 |
-
|
236 |
-
|
237 |
|
238 |
gr.Markdown("""# Chat with Needs Assessment Experts (Past and Present)
|
239 |
## Ask questions of experts on needs assessments, get responses from *needs assessment* version of ChatGPT.
|
|
|
6 |
import langchain
|
7 |
import chromadb
|
8 |
import glob
|
9 |
+
import pickle
|
10 |
|
11 |
from PyPDF2 import PdfReader
|
12 |
from PyPDF2 import PdfWriter
|
|
|
229 |
|
230 |
|
231 |
with gr.Column(elem_id="col-container"):
|
232 |
+
with open("embeddings.pkl", 'rb') as f:
|
233 |
+
new_docsearch = pickle.load(f)
|
234 |
|
235 |
+
query = str("performance")
|
236 |
+
docs = new_docsearch.similarity_search(query)
|
237 |
|
238 |
gr.Markdown("""# Chat with Needs Assessment Experts (Past and Present)
|
239 |
## Ask questions of experts on needs assessments, get responses from *needs assessment* version of ChatGPT.
|