Update demo.py
Browse files
demo.py
CHANGED
@@ -141,8 +141,8 @@ def answer(user_question):
|
|
141 |
|
142 |
full_result_string = ''
|
143 |
for company in results.docs:
|
144 |
-
full_result_string += company.id + ' ' + company.item_keywords + "\n\n\n"
|
145 |
-
|
146 |
memory = ConversationBufferMemory(memory_key="chat_history")
|
147 |
llm_chain = LLMChain(
|
148 |
llm=llm,
|
@@ -151,10 +151,11 @@ def answer(user_question):
|
|
151 |
memory=memory,
|
152 |
)
|
153 |
|
154 |
-
|
155 |
-
ans = llm_chain.predict(user_msg= f"{full_result_string} ---\n\n {user_question}")
|
156 |
|
157 |
return ans
|
|
|
158 |
|
159 |
demo = gr.Interface(
|
160 |
|
|
|
141 |
|
142 |
full_result_string = ''
|
143 |
for company in results.docs:
|
144 |
+
ans = full_result_string += company.id + ' ' + company.item_keywords + "\n\n\n"
|
145 |
+
|
146 |
memory = ConversationBufferMemory(memory_key="chat_history")
|
147 |
llm_chain = LLMChain(
|
148 |
llm=llm,
|
|
|
151 |
memory=memory,
|
152 |
)
|
153 |
|
154 |
+
ans2 = llm_chain.predict(full_result_string)
|
155 |
+
ans = llm_chain.predict(user_msg= f"{full_result_string} ---\n\n {'user_question':user_question}")
|
156 |
|
157 |
return ans
|
158 |
+
|
159 |
|
160 |
demo = gr.Interface(
|
161 |
|