Spaces:
Runtime error
Runtime error
Modify page style
Browse files
app.py
CHANGED
@@ -14,22 +14,18 @@ with gr.Blocks() as demo:
|
|
14 |
output1 = gr.Textbox(label="Speech emotion")
|
15 |
output2 = gr.Textbox(label="Text emotion")
|
16 |
btn = gr.Button("Analyze audio")
|
17 |
-
|
18 |
-
btn.click(fn=infere_voice2text, inputs=input, outputs=output0)
|
19 |
-
btn.click(fn=infere_speech_emotion, inputs=input, outputs=output1)
|
20 |
-
output0.change(fn=infere_text_emotion, inputs=output0, outputs=output2)
|
21 |
-
|
22 |
-
gr.HTML('''
|
23 |
-
<br>
|
24 |
-
<h3 style="text-align:center;">View examples of how speech and words can convey different emotions by clicking below</h3>
|
25 |
-
''')
|
26 |
|
27 |
gr.Examples(
|
28 |
[
|
29 |
os.path.join(os.path.dirname(__file__), "audio/a_good_dream.wav"),
|
30 |
os.path.join(os.path.dirname(__file__), "audio/hype_in_ai.wav"),
|
31 |
],
|
32 |
-
input
|
|
|
33 |
)
|
|
|
|
|
|
|
|
|
34 |
|
35 |
-
demo.launch()
|
|
|
14 |
output1 = gr.Textbox(label="Speech emotion")
|
15 |
output2 = gr.Textbox(label="Text emotion")
|
16 |
btn = gr.Button("Analyze audio")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
|
18 |
gr.Examples(
|
19 |
[
|
20 |
os.path.join(os.path.dirname(__file__), "audio/a_good_dream.wav"),
|
21 |
os.path.join(os.path.dirname(__file__), "audio/hype_in_ai.wav"),
|
22 |
],
|
23 |
+
input,
|
24 |
+
label="Examples of cases in which speech and words can convey different"
|
25 |
)
|
26 |
+
|
27 |
+
btn.click(fn=infere_voice2text, inputs=input, outputs=output0)
|
28 |
+
btn.click(fn=infere_speech_emotion, inputs=input, outputs=output1)
|
29 |
+
output0.change(fn=infere_text_emotion, inputs=output0, outputs=output2)
|
30 |
|
31 |
+
demo.launch()
|