wasmdashai commited on
Commit
a9705e7
·
verified ·
1 Parent(s): f192519

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -200,9 +200,11 @@ def t2t(text):
200
 
201
 
202
  def t2tstream(text):
 
203
  response=get_answer_ai_stream(text)
204
  for chk in response:
205
- yield chk.text
 
206
 
207
 
208
  #return get_answer_ai(text)
@@ -364,6 +366,7 @@ with gr.Blocks() as demo: # Use gr.Blocks to wrap the entire interface
364
  text_out1 = gr.Textbox()
365
  text_inputk2.submit(t2tstream, [text_inputk2], [text_out1])
366
 
 
367
 
368
 
369
 
 
200
 
201
 
202
  def t2tstream(text):
203
+ st=''
204
  response=get_answer_ai_stream(text)
205
  for chk in response:
206
+ st+=chk.text
207
+ yield st
208
 
209
 
210
  #return get_answer_ai(text)
 
366
  text_out1 = gr.Textbox()
367
  text_inputk2.submit(t2tstream, [text_inputk2], [text_out1])
368
 
369
+
370
 
371
 
372