GiantPandas commited on
Commit
6e2d5ef
·
verified ·
1 Parent(s): 6d4df57

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -147,7 +147,8 @@ def _launch_demo(args):
147
  elif q and q.strip():
148
  content.append({"type": "text", 'text': q})
149
  messages.append({'role': 'user', 'content': content})
150
- messages.append({'role': 'assistant', 'content': [{"type": "text", 'text': a}]})
 
151
  content = []
152
  else:
153
  continue
 
147
  elif q and q.strip():
148
  content.append({"type": "text", 'text': q})
149
  messages.append({'role': 'user', 'content': content})
150
+ if a not in (None, ""):
151
+ messages.append({'role': 'assistant', 'content': [{"type": "text", 'text': a}]})
152
  content = []
153
  else:
154
  continue