Spaces:
Runtime error
Runtime error
update
Browse files
app.py
CHANGED
@@ -75,7 +75,31 @@ with gr.Blocks() as app:
|
|
75 |
record_button = gr.Button("Detection Parts of Speech")
|
76 |
record_output = gr.Text(label = 'result')
|
77 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
record_button.click(emotion_predict, inputs=record_input, outputs=record_output)
|
|
|
|
|
79 |
plot_record.click(plot_fig, inputs=record_input, outputs=plot_record_c)
|
|
|
80 |
|
81 |
app.launch()
|
|
|
75 |
record_button = gr.Button("Detection Parts of Speech")
|
76 |
record_output = gr.Text(label = 'result')
|
77 |
|
78 |
+
with gr.Tab("Upload Audio File"):
|
79 |
+
gr.Markdown(
|
80 |
+
"""
|
81 |
+
## Uploaded Audio should be of .wav format
|
82 |
+
"""
|
83 |
+
)
|
84 |
+
|
85 |
+
upload_input = gr.Audio(type="filepath")
|
86 |
+
|
87 |
+
with gr.Accordion("Audio Visualization", open=False):
|
88 |
+
gr.Markdown(
|
89 |
+
"""
|
90 |
+
### Visualization will work only after Audio has been submitted
|
91 |
+
"""
|
92 |
+
)
|
93 |
+
plot_upload = gr.Button("Display Audio Signal")
|
94 |
+
plot_upload_c = gr.Plot(label='Waveform Of the Audio')
|
95 |
+
|
96 |
+
upload_button = gr.Button("Detection Parts of Speech")
|
97 |
+
upload_output = gr.Text(label = 'result')
|
98 |
+
|
99 |
record_button.click(emotion_predict, inputs=record_input, outputs=record_output)
|
100 |
+
upload_button.click(emotion_predict, inputs=upload_input, outputs=upload_output)
|
101 |
+
|
102 |
plot_record.click(plot_fig, inputs=record_input, outputs=plot_record_c)
|
103 |
+
plot_upload.click(plot_fig, inputs=upload_input, outputs=plot_upload_c)
|
104 |
|
105 |
app.launch()
|