Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -156,7 +156,7 @@ def answer_question(context, question):
|
|
156 |
messages = [
|
157 |
# {"role": "system", "content": "You are a helpful assistant who can answer questions based on the given context."},
|
158 |
{"role":"system", "content": SYSTEM_MESSAGE},
|
159 |
-
{"role": "user", "content": f"Context: {
|
160 |
]
|
161 |
|
162 |
response = qa_pipeline(messages, max_new_tokens=256)[0]['generated_text']
|
|
|
156 |
messages = [
|
157 |
# {"role": "system", "content": "You are a helpful assistant who can answer questions based on the given context."},
|
158 |
{"role":"system", "content": SYSTEM_MESSAGE},
|
159 |
+
{"role": "user", "content": f"Context: {context}\n\nQuestion: {question}"}
|
160 |
]
|
161 |
|
162 |
response = qa_pipeline(messages, max_new_tokens=256)[0]['generated_text']
|