Hobis commited on
Commit
0c6f787
1 Parent(s): 2eaaa08

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
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 "Plik audio został przetworzony i zapisany jako helloWorld.npz"
35
 
36
- audio_input = gr.inputs.Audio(label="Wybierz plik audio")
37
- audio_output = gr.outputs.Textbox(label="Status")
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
+