Spaces:
Sleeping
Sleeping
ASG Models
commited on
Commit
•
2b181ab
1
Parent(s):
d86b643
Update app.py
Browse files
app.py
CHANGED
@@ -214,11 +214,11 @@ def text_to_speech(text):
|
|
214 |
yield modelspeech(pad_text)
|
215 |
# for stream_wav in generate_audio(pad_text):
|
216 |
# yield stream_wav
|
217 |
-
def dash(text):
|
218 |
|
219 |
response=get_answer_ai(text)
|
220 |
for chunk in response:
|
221 |
-
yield chunk.text
|
222 |
|
223 |
|
224 |
|
@@ -231,7 +231,7 @@ with gr.Blocks() as demo:
|
|
231 |
gr.Markdown("# Text to Speech")
|
232 |
text_input = gr.Textbox(label="Enter Text")
|
233 |
text_out = gr.Textbox()
|
234 |
-
text_input.submit(dash, text_input, text_out)
|
235 |
with gr.Tab("AI Speech"):
|
236 |
gr.Markdown("# Text to Speech")
|
237 |
text_input2 = gr.Textbox(label="Enter Text")
|
|
|
214 |
yield modelspeech(pad_text)
|
215 |
# for stream_wav in generate_audio(pad_text):
|
216 |
# yield stream_wav
|
217 |
+
def dash(text,state=''):
|
218 |
|
219 |
response=get_answer_ai(text)
|
220 |
for chunk in response:
|
221 |
+
yield state+chunk.text
|
222 |
|
223 |
|
224 |
|
|
|
231 |
gr.Markdown("# Text to Speech")
|
232 |
text_input = gr.Textbox(label="Enter Text")
|
233 |
text_out = gr.Textbox()
|
234 |
+
text_input.submit(dash, [text_input,text_out], text_out)
|
235 |
with gr.Tab("AI Speech"):
|
236 |
gr.Markdown("# Text to Speech")
|
237 |
text_input2 = gr.Textbox(label="Enter Text")
|