hysts HF Staff commited on
Commit
32fbbc8
·
verified ·
1 Parent(s): ce6f0c4

Describe the broken behaviour accurately

Browse files
Files changed (1) hide show
  1. app.py +7 -4
app.py CHANGED
@@ -9,8 +9,11 @@ Three ways a Gradio component used as chat content breaks:
9
  3. The same plot wrapped in a `gr.ChatMessage` so it renders as a thought,
10
  which takes a different route out of the chat function.
11
 
12
- On a broken release, sending a message gets no reply at all: the failure
13
- happens in the queue after the prediction, so nothing is sent to the browser.
 
 
 
14
  """
15
 
16
  import bokeh.plotting
@@ -55,8 +58,8 @@ demo = gr.ChatInterface(
55
  description=(
56
  check_component_as_initial_value()
57
  + "\n\n**Cases 2 and 3** — send any message. On a broken release the "
58
- "reply never arrives and the spinner keeps going; once fixed, two plots "
59
- "appear, one as a normal message and one inside a thought."
60
  ),
61
  )
62
 
 
9
  3. The same plot wrapped in a `gr.ChatMessage` so it renders as a thought,
10
  which takes a different route out of the chat function.
11
 
12
+ On a broken release, sending a message fails. Which deep copy raises first
13
+ depends on what the chat function returns: a bare component blows up in the
14
+ queue after the prediction, so the browser gets no reply at all and the spinner
15
+ keeps going, while a component wrapped in a `gr.ChatMessage` blows up inside the
16
+ prediction and surfaces as an error.
17
  """
18
 
19
  import bokeh.plotting
 
58
  description=(
59
  check_component_as_initial_value()
60
  + "\n\n**Cases 2 and 3** — send any message. On a broken release the "
61
+ "request fails; once fixed, two plots appear, one as a normal message "
62
+ "and one inside a thought."
63
  ),
64
  )
65