Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -49,11 +49,11 @@ def chatbot(question, chat_history):
|
|
| 49 |
response = chain.run(question)
|
| 50 |
retrieval_result = qna(question)
|
| 51 |
retrieval_answer = retrieval_result['result']
|
| 52 |
-
if retrival_answer.strip():
|
| 53 |
-
|
| 54 |
-
else:
|
| 55 |
-
|
| 56 |
-
|
| 57 |
return combined_response
|
| 58 |
demo = gr.ChatInterface(
|
| 59 |
fn=chatbot,
|
|
|
|
| 49 |
response = chain.run(question)
|
| 50 |
retrieval_result = qna(question)
|
| 51 |
retrieval_answer = retrieval_result['result']
|
| 52 |
+
# if retrival_answer.strip():
|
| 53 |
+
# combined_response=f"Based on the information available:\n{retrieval_answer}"
|
| 54 |
+
# else:
|
| 55 |
+
# combined_response=f"Response through LLM:\n{response}"
|
| 56 |
+
combined_response = f"{response}\n\nBased on the information available:\n{retrieval_answer}"
|
| 57 |
return combined_response
|
| 58 |
demo = gr.ChatInterface(
|
| 59 |
fn=chatbot,
|