Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
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
|