Update app.py
Browse files
app.py
CHANGED
@@ -46,7 +46,7 @@ Recommendation:
|
|
46 |
|
47 |
PROMPT = PromptTemplate(
|
48 |
template=prompt_template,
|
49 |
-
input_variables=["chat_history", "
|
50 |
)
|
51 |
|
52 |
# Initialize the language model
|
@@ -86,8 +86,8 @@ if prompt := st.chat_input("What are you looking to learn?"):
|
|
86 |
|
87 |
# Assistant response generation with streaming effect
|
88 |
with st.chat_message("assistant"):
|
89 |
-
response = qa_chain({"
|
90 |
-
response_text = response["
|
91 |
|
92 |
# Stream the response word by word
|
93 |
for accumulated_response in response_text:
|
|
|
46 |
|
47 |
PROMPT = PromptTemplate(
|
48 |
template=prompt_template,
|
49 |
+
input_variables=["chat_history", "question", "context"]
|
50 |
)
|
51 |
|
52 |
# Initialize the language model
|
|
|
86 |
|
87 |
# Assistant response generation with streaming effect
|
88 |
with st.chat_message("assistant"):
|
89 |
+
response = qa_chain({"question": prompt})
|
90 |
+
response_text = response["answer"]
|
91 |
|
92 |
# Stream the response word by word
|
93 |
for accumulated_response in response_text:
|