Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -158,8 +158,8 @@ def answer_question(context, question):
|
|
158 |
{"role":"system", "content": SYSTEM_MESSAGE},
|
159 |
{"role": "user", "content": f"Context: {context}\n Question: {question}"}
|
160 |
]
|
161 |
-
logger.info(response)
|
162 |
response = qa_pipeline(messages, max_new_tokens=256)[0]['generated_text']
|
|
|
163 |
return response[1]
|
164 |
except Exception as e:
|
165 |
logger.error(f"Q&A failed: {str(e)}")
|
|
|
158 |
{"role":"system", "content": SYSTEM_MESSAGE},
|
159 |
{"role": "user", "content": f"Context: {context}\n Question: {question}"}
|
160 |
]
|
|
|
161 |
response = qa_pipeline(messages, max_new_tokens=256)[0]['generated_text']
|
162 |
+
logger.info(response)
|
163 |
return response[1]
|
164 |
except Exception as e:
|
165 |
logger.error(f"Q&A failed: {str(e)}")
|