ffreemt commited on
Commit
b00e246
·
1 Parent(s): 2987cd6

Update yield from bot_stream in bot_stream_state

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -136,6 +136,9 @@ def bot(chat_history, **kwargs):
136
  return chat_history
137
 
138
  def bot_stream(chat_history, **kwargs):
 
 
 
139
  try:
140
  message = chat_history[-1][0]
141
  except Exception as exc:
@@ -180,7 +183,8 @@ with gr.Blocks(
180
 
181
  config = asdict(stats.value.config)
182
  def bot_stream_state(chat_history):
183
- return bot_stream(chat_history, **config)
 
184
 
185
  with gr.Accordion("🎈 Info", open=False):
186
  gr.Markdown(
 
136
  return chat_history
137
 
138
  def bot_stream(chat_history, **kwargs):
139
+ logger.trace(f"{chat_history=}")
140
+ logger.trace(f"{kwargs=}")
141
+
142
  try:
143
  message = chat_history[-1][0]
144
  except Exception as exc:
 
183
 
184
  config = asdict(stats.value.config)
185
  def bot_stream_state(chat_history):
186
+ logger.trace(f"{chat_history=}")
187
+ yield from bot_stream(chat_history, **config)
188
 
189
  with gr.Accordion("🎈 Info", open=False):
190
  gr.Markdown(