Spaces:
Running
Running
Commit ·
37f7787
1
Parent(s): a2f07a4
keep debug message
Browse files178 unmodified lines179180181182183184185186187188189190191192193178 unmodified linesgen_thread.start()assistant_text = ''first = Truefor chunk in streamer:if cancel_event.is_set():breakassistant_text += chunkhistory[-1]['content'] = assistant_text# Show debug only onceyield history, (debug if first else '')first = Falsegen_thread.join()except Exception as e:history[-1]['content'] = f"Error: {e}"178 unmodified lines179180181182183184185186187188189190191178 unmodified linesgen_thread.start()assistant_text = ''for chunk in streamer:if cancel_event.is_set():breakassistant_text += chunkhistory[-1]['content'] = assistant_text# Show debug only onceyield history, debuggen_thread.join()except Exception as e:history[-1]['content'] = f"Error: {e}"
app.py+1-3