ahmadmac commited on
Commit
58471a9
·
verified ·
1 Parent(s): f8a0ef3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
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
- 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}\nBased on the information available:\n{retrieval_answer}"
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,