Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -28,13 +28,15 @@ def process_audio(audio_file):
|
|
28 |
fine_prompt = codes
|
29 |
coarse_prompt = fine_prompt[:2, :]
|
30 |
np.savez('helloWorld.npz', semantic_prompt=semantic_tokens, fine_prompt=fine_prompt, coarse_prompt=coarse_prompt)
|
|
|
31 |
|
32 |
def audio_file_processing(input_audio):
|
33 |
-
process_audio('audio.wav')
|
34 |
-
return
|
35 |
|
36 |
-
audio_input = gr.inputs.Audio(label="
|
37 |
-
audio_output = gr.outputs.
|
38 |
|
39 |
gr.Interface(fn=audio_file_processing, inputs=audio_input, outputs=audio_output).launch()
|
40 |
|
|
|
|
28 |
fine_prompt = codes
|
29 |
coarse_prompt = fine_prompt[:2, :]
|
30 |
np.savez('helloWorld.npz', semantic_prompt=semantic_tokens, fine_prompt=fine_prompt, coarse_prompt=coarse_prompt)
|
31 |
+
return os.path.abspath('helloWorld.npz')
|
32 |
|
33 |
def audio_file_processing(input_audio):
|
34 |
+
processed_file = process_audio('audio.wav')
|
35 |
+
return processed_file
|
36 |
|
37 |
+
audio_input = gr.inputs.Audio(label="Select an audio file")
|
38 |
+
audio_output = gr.outputs.File(label="Download")
|
39 |
|
40 |
gr.Interface(fn=audio_file_processing, inputs=audio_input, outputs=audio_output).launch()
|
41 |
|
42 |
+
|