Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -145,20 +145,17 @@ with demo:
|
|
145 |
label = gr.Label()
|
146 |
saved = gr.Textbox()
|
147 |
savedAll = gr.Textbox()
|
148 |
-
TTSchoice = gr.inputs.Radio( label="Pick a TTS Model", choices=MODEL_NAMES )
|
149 |
audio = gr.Audio(label="Output", interactive=False)
|
150 |
|
151 |
b1 = gr.Button("Recognize Speech")
|
152 |
b2 = gr.Button("Classify Sentiment")
|
153 |
b3 = gr.Button("Save Speech to Text")
|
154 |
b4 = gr.Button("Retrieve All")
|
155 |
-
b5 = gr.Button("Read It Back Aloud")
|
156 |
|
157 |
b1.click(speech_to_text, inputs=audio_file, outputs=text)
|
158 |
b2.click(text_to_sentiment, inputs=text, outputs=label)
|
159 |
b3.click(upsert, inputs=text, outputs=saved)
|
160 |
b4.click(selectall, inputs=text, outputs=savedAll)
|
161 |
-
b5.click(tts, inputs=[text,TTSchoice], outputs=audio)
|
162 |
|
163 |
input_story_type = gr.Radio(choices=['superhero', 'action', 'drama', 'horror', 'thriller', 'sci_fi'], value='sci_fi', label="Genre")
|
164 |
input_start_text = gr.Textbox(placeholder='A teddy bear outer space', label="Starting Text")
|
|
|
145 |
label = gr.Label()
|
146 |
saved = gr.Textbox()
|
147 |
savedAll = gr.Textbox()
|
|
|
148 |
audio = gr.Audio(label="Output", interactive=False)
|
149 |
|
150 |
b1 = gr.Button("Recognize Speech")
|
151 |
b2 = gr.Button("Classify Sentiment")
|
152 |
b3 = gr.Button("Save Speech to Text")
|
153 |
b4 = gr.Button("Retrieve All")
|
|
|
154 |
|
155 |
b1.click(speech_to_text, inputs=audio_file, outputs=text)
|
156 |
b2.click(text_to_sentiment, inputs=text, outputs=label)
|
157 |
b3.click(upsert, inputs=text, outputs=saved)
|
158 |
b4.click(selectall, inputs=text, outputs=savedAll)
|
|
|
159 |
|
160 |
input_story_type = gr.Radio(choices=['superhero', 'action', 'drama', 'horror', 'thriller', 'sci_fi'], value='sci_fi', label="Genre")
|
161 |
input_start_text = gr.Textbox(placeholder='A teddy bear outer space', label="Starting Text")
|