Kr08 commited on
Commit
671b74b
·
verified ·
1 Parent(s): 3c60188

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -140,7 +140,7 @@ def answer_question(context, question):
140
 
141
  # Extract the answer from the output
142
  if isinstance(outputs, list) and len(outputs) > 0 and isinstance(outputs[0], dict):
143
- for message in outputs:
144
  if message.get('role') == 'assistant':
145
  answer = message.get('content', '')
146
  break
 
140
 
141
  # Extract the answer from the output
142
  if isinstance(outputs, list) and len(outputs) > 0 and isinstance(outputs[0], dict):
143
+ for message in outputs[0]:
144
  if message.get('role') == 'assistant':
145
  answer = message.get('content', '')
146
  break