Spaces:
Sleeping
Sleeping
mohammed3536
commited on
Commit
•
4d62b33
1
Parent(s):
b38f6a1
Update app.py
Browse files
app.py
CHANGED
@@ -66,7 +66,8 @@ def generate_quiz(quiz_name, quiz_topic, num_questions, pdf_content):
|
|
66 |
if st.session_state.vectorDB:
|
67 |
# Create a prompt template for question and options
|
68 |
template = f"Quiz: {quiz_name}\nTopic: {quiz_topic}\nQuestion: {question}\nOptions: {', '.join(options)}\nCorrect Answer: {correct_answer}"
|
69 |
-
prompt = PromptTemplate(template=template)
|
|
|
70 |
|
71 |
# Store question data in vector database
|
72 |
st.session_state.vectorDB.add(prompt.generate(), embedding=None)
|
|
|
66 |
if st.session_state.vectorDB:
|
67 |
# Create a prompt template for question and options
|
68 |
template = f"Quiz: {quiz_name}\nTopic: {quiz_topic}\nQuestion: {question}\nOptions: {', '.join(options)}\nCorrect Answer: {correct_answer}"
|
69 |
+
prompt = PromptTemplate(template=template, input_variables=['chat_history','human_input','name','context'])
|
70 |
+
|
71 |
|
72 |
# Store question data in vector database
|
73 |
st.session_state.vectorDB.add(prompt.generate(), embedding=None)
|