Luigi commited on
Commit
37f7787
·
1 Parent(s): a2f07a4

keep debug message

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -179,15 +179,13 @@ def chat_response(user_msg, chat_history, system_prompt,
179
  gen_thread.start()
180
 
181
  assistant_text = ''
182
- first = True
183
  for chunk in streamer:
184
  if cancel_event.is_set():
185
  break
186
  assistant_text += chunk
187
  history[-1]['content'] = assistant_text
188
  # Show debug only once
189
- yield history, (debug if first else '')
190
- first = False
191
  gen_thread.join()
192
  except Exception as e:
193
  history[-1]['content'] = f"Error: {e}"
 
179
  gen_thread.start()
180
 
181
  assistant_text = ''
 
182
  for chunk in streamer:
183
  if cancel_event.is_set():
184
  break
185
  assistant_text += chunk
186
  history[-1]['content'] = assistant_text
187
  # Show debug only once
188
+ yield history, debug
 
189
  gen_thread.join()
190
  except Exception as e:
191
  history[-1]['content'] = f"Error: {e}"