jhtonyKoo commited on
Commit
fdad8d5
·
verified ·
1 Parent(s): 0b67799

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -7
app.py CHANGED
@@ -66,9 +66,9 @@ def inference(file_uploaded_in, file_uploaded_ref):
66
  args = set_up()
67
 
68
  inference_style_transfer = Mixing_Style_Transfer_Inference(args)
69
- output_wav_path = inference_style_transfer.inference(file_uploaded_in, file_uploaded_ref)
70
 
71
- return output_wav_path
72
 
73
 
74
 
@@ -102,7 +102,7 @@ with gr.Blocks() as demo:
102
  with gr.Column():
103
  with gr.Blocks():
104
  with gr.Tab("Input Music"):
105
- file_uploaded_in = gr.Audio(label="Input track (mix) to be mixing style transferred", type="filepath")
106
  with gr.Tab("YouTube url"):
107
  with gr.Row():
108
  yt_link_in = gr.Textbox(
@@ -127,7 +127,7 @@ with gr.Blocks() as demo:
127
  )
128
  with gr.Blocks():
129
  with gr.Tab("Reference Music"):
130
- file_uploaded_ref = gr.Audio(label="Reference track (mix) to copy mixing style", type="filepath")
131
  with gr.Tab("YouTube url"):
132
  with gr.Row():
133
  yt_link_ref = gr.Textbox(
@@ -160,7 +160,7 @@ with gr.Blocks() as demo:
160
  with gr.Column():
161
  inference_btn = gr.Button("Run Mixing Style Transfer")
162
  with gr.Row():
163
- output_mix = gr.Audio(label="mixing style transferred music track")
164
  inference_btn.click(
165
  inference,
166
  inputs=[file_uploaded_in, file_uploaded_ref],
@@ -170,5 +170,4 @@ with gr.Blocks() as demo:
170
 
171
 
172
  if __name__ == "__main__":
173
- demo.launch(debug=True)
174
-
 
66
  args = set_up()
67
 
68
  inference_style_transfer = Mixing_Style_Transfer_Inference(args)
69
+ output_wav_path, fin_data_out_mix = inference_style_transfer.inference(file_uploaded_in, file_uploaded_ref)
70
 
71
+ return (44100, fin_data_out_mix)
72
 
73
 
74
 
 
102
  with gr.Column():
103
  with gr.Blocks():
104
  with gr.Tab("Input Music"):
105
+ file_uploaded_in = gr.Audio(label="Input track (mix) to be mixing style transferred")
106
  with gr.Tab("YouTube url"):
107
  with gr.Row():
108
  yt_link_in = gr.Textbox(
 
127
  )
128
  with gr.Blocks():
129
  with gr.Tab("Reference Music"):
130
+ file_uploaded_ref = gr.Audio(label="Reference track (mix) to copy mixing style")
131
  with gr.Tab("YouTube url"):
132
  with gr.Row():
133
  yt_link_ref = gr.Textbox(
 
160
  with gr.Column():
161
  inference_btn = gr.Button("Run Mixing Style Transfer")
162
  with gr.Row():
163
+ output_mix = gr.Audio(label="mixing style transferred music track", type='numpy')
164
  inference_btn.click(
165
  inference,
166
  inputs=[file_uploaded_in, file_uploaded_ref],
 
170
 
171
 
172
  if __name__ == "__main__":
173
+ demo.launch(debug=True)