Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -144,20 +144,24 @@ def generate_interpolation(gallery):
|
|
| 144 |
demo = gr.Blocks()
|
| 145 |
|
| 146 |
with demo:
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 161 |
with gr.Row():
|
| 162 |
# Left column (inputs)
|
| 163 |
with gr.Column():
|
|
|
|
| 144 |
demo = gr.Blocks()
|
| 145 |
|
| 146 |
with demo:
|
| 147 |
+
with gr.Row():
|
| 148 |
+
# Left column (inputs)
|
| 149 |
+
with gr.Column():
|
| 150 |
+
audio_file = gr.inputs.Audio(source="microphone", type="filepath")
|
| 151 |
+
text = gr.Textbox()
|
| 152 |
+
label = gr.Label()
|
| 153 |
+
saved = gr.Textbox()
|
| 154 |
+
savedAll = gr.Textbox()
|
| 155 |
+
with gr.Column():
|
| 156 |
+
b1 = gr.Button("Recognize Speech")
|
| 157 |
+
b2 = gr.Button("Classify Sentiment")
|
| 158 |
+
b3 = gr.Button("Save Speech to Text")
|
| 159 |
+
b4 = gr.Button("Retrieve All")
|
| 160 |
+
b1.click(speech_to_text, inputs=audio_file, outputs=text)
|
| 161 |
+
b2.click(text_to_sentiment, inputs=text, outputs=label)
|
| 162 |
+
b3.click(upsert, inputs=text, outputs=saved)
|
| 163 |
+
b4.click(selectall, inputs=text, outputs=savedAll)
|
| 164 |
+
|
| 165 |
with gr.Row():
|
| 166 |
# Left column (inputs)
|
| 167 |
with gr.Column():
|