Spaces:
Running
Running
finename
Browse files
app.py
CHANGED
|
@@ -171,15 +171,22 @@ def model_inference(inputs):
|
|
| 171 |
def convert_audio(inputs):
|
| 172 |
return model_inference(inputs)
|
| 173 |
|
| 174 |
-
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 184 |
# demo.queue(concurrency_count=1, max_size=5)
|
| 185 |
demo.launch()
|
|
|
|
| 171 |
def convert_audio(inputs):
|
| 172 |
return model_inference(inputs)
|
| 173 |
|
| 174 |
+
def build_audio_flow(title, description, article):
|
| 175 |
+
# Define file upload element
|
| 176 |
+
audio_file = gr.File(label="Select Audio File (WAV, FLAC)")
|
| 177 |
+
|
| 178 |
+
demo = gr.Interface(
|
| 179 |
+
fn=convert_audio,
|
| 180 |
+
inputs=[audio_file],
|
| 181 |
+
outputs=outputs,
|
| 182 |
+
allow_flagging="never",
|
| 183 |
+
title=title,
|
| 184 |
+
description=description,
|
| 185 |
+
article=article,
|
| 186 |
+
)
|
| 187 |
+
|
| 188 |
+
return demo
|
| 189 |
+
|
| 190 |
+
demo = build_audio_flow(title, description, article)
|
| 191 |
# demo.queue(concurrency_count=1, max_size=5)
|
| 192 |
demo.launch()
|