freddyaboulton HF staff commited on
Commit
39d826e
1 Parent(s): 9a16ab9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -95,9 +95,8 @@ def response(audio: tuple[int, np.ndarray], conversation: list[dict], img: str |
95
  elif b'Content-Type: text/plain' in frame:
96
  text_data = frame.split(b'\r\n\r\n', 1)[1].decode()
97
  resp_text += text_data
98
- if len(text_data) > 0:
99
- conversation[-1]["content"] = resp_text
100
- yield AdditionalOutputs(conversation)
101
  except Exception as e:
102
  raise Exception(f"Error during audio streaming: {e}") from e
103
 
 
95
  elif b'Content-Type: text/plain' in frame:
96
  text_data = frame.split(b'\r\n\r\n', 1)[1].decode()
97
  resp_text += text_data
98
+ conversation[-1]["content"] = resp_text
99
+ yield AdditionalOutputs(conversation)
 
100
  except Exception as e:
101
  raise Exception(f"Error during audio streaming: {e}") from e
102