Moha782 commited on
Commit
42961d5
·
verified ·
1 Parent(s): 43b5768

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -36,12 +36,12 @@ def respond(
36
  stream=True,
37
  temperature=temperature,
38
  top_p=top_p,
39
- qa_pipeline=qa_pipeline, # Pass the question-answering pipeline
40
  ):
41
  token = message.choices[0].delta.content
42
 
 
43
  response += token
44
- yield response
45
 
46
  """
47
  For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
 
36
  stream=True,
37
  temperature=temperature,
38
  top_p=top_p,
 
39
  ):
40
  token = message.choices[0].delta.content
41
 
42
+ response = qa_pipeline(question=message, context=system_message)["answer"]
43
  response += token
44
+ return response
45
 
46
  """
47
  For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface