Kr08 commited on
Commit
e2dfaeb
·
verified ·
1 Parent(s): fd4c429

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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)}")