anasmkh commited on
Commit
06e8b05
·
verified ·
1 Parent(s): 1f76b92

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -1
main.py CHANGED
@@ -60,6 +60,7 @@ def gradinterface(query,history):
60
  Use three sentences maximum and keep the answer as concise as possible.
61
  {context}
62
  Question: {question}
 
63
  Helpful Answer:"""
64
 
65
  QA_CHAIN_PROMPT = PromptTemplate(
@@ -72,7 +73,7 @@ def gradinterface(query,history):
72
  chain_type_kwargs={"prompt": QA_CHAIN_PROMPT},
73
  )
74
  result = qa_chain({"query": query})
75
- return result['result']
76
 
77
 
78
  demo = gr.ChatInterface(fn=gradinterface, title='OUR_OWN_BOT')
 
60
  Use three sentences maximum and keep the answer as concise as possible.
61
  {context}
62
  Question: {question}
63
+
64
  Helpful Answer:"""
65
 
66
  QA_CHAIN_PROMPT = PromptTemplate(
 
73
  chain_type_kwargs={"prompt": QA_CHAIN_PROMPT},
74
  )
75
  result = qa_chain({"query": query})
76
+ return result['result'].split(': ')[-1].strip()
77
 
78
 
79
  demo = gr.ChatInterface(fn=gradinterface, title='OUR_OWN_BOT')