neuralleap commited on
Commit
b859ab8
1 Parent(s): ca06ad9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -6
app.py CHANGED
@@ -80,13 +80,11 @@ with gr.Blocks() as demo:
80
  history[-1][1] = ""
81
  for chunk in response:
82
  processed_chunk = chunk.decode('utf-8')
83
- if id==100:
 
84
  full_text = full_text + processed_chunk
85
- for c in processed_chunk:
86
- history[-1][1] += c
87
- # streaming chunks to ui
88
- time.sleep(0.01)
89
- yield history,"",gr.Audio(streaming=True,autoplay=True,value="true.wav")
90
  else:
91
  history[-1][1] += processed_chunk
92
  full_text = full_text + processed_chunk
 
80
  history[-1][1] = ""
81
  for chunk in response:
82
  processed_chunk = chunk.decode('utf-8')
83
+ if id==1:
84
+ history[-1][1] += processed_chunk
85
  full_text = full_text + processed_chunk
86
+ time.sleep(0.01)
87
+ yield history,"",gr.Audio(autoplay=True)
 
 
 
88
  else:
89
  history[-1][1] += processed_chunk
90
  full_text = full_text + processed_chunk