Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -69,8 +69,12 @@ def generate_quiz(quiz_name, quiz_topic, num_questions, pdf_content):
|
|
69 |
prompt = PromptTemplate(template=template, input_variables=['chat_history','human_input','name','context'])
|
70 |
|
71 |
|
72 |
-
#
|
73 |
-
st.session_state.vectorDB.
|
|
|
|
|
|
|
|
|
74 |
|
75 |
# Save button to store vector database
|
76 |
if st.session_state.vectorDB:
|
|
|
69 |
prompt = PromptTemplate(template=template, input_variables=['chat_history','human_input','name','context'])
|
70 |
|
71 |
|
72 |
+
# Get the vector from the prompt
|
73 |
+
vector = st.session_state.vectorDB.embed(prompt.generate())
|
74 |
+
|
75 |
+
# Add the vector to the FAISS index
|
76 |
+
st.session_state.vectorDB.index([vector])
|
77 |
+
|
78 |
|
79 |
# Save button to store vector database
|
80 |
if st.session_state.vectorDB:
|