ysharma HF Staff commited on
Commit
6b71acb
·
1 Parent(s): 6880ee4
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -71,7 +71,8 @@ def predict(inputs, chatbot):
71
  for chunk in response:
72
  if len(chunk['choices'][0]['delta']) != 0:
73
  print(chunk['choices'][0]['delta']['content'])
74
- yield chunk['choices'][0]['delta']['content']
 
75
  #time.sleep(0.5)
76
 
77
  def echo_stream(message, history):
 
71
  for chunk in response:
72
  if len(chunk['choices'][0]['delta']) != 0:
73
  print(chunk['choices'][0]['delta']['content'])
74
+ partial_message = partial_message + chunk['choices'][0]['delta']['content']
75
+ yield partial_message
76
  #time.sleep(0.5)
77
 
78
  def echo_stream(message, history):