Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,7 @@ logging.getLogger('matplotlib').setLevel(logging.WARNING)
|
|
16 |
|
17 |
model = Svc("logs/44k/G_199200.pth", "logs/44k/config.json", cluster_model_path="logs/44k/kmeans_10000.pt")
|
18 |
|
19 |
-
def
|
20 |
if input_audio is None:
|
21 |
return "You need to upload an audio", None
|
22 |
sampling_rate, audio = input_audio
|
@@ -43,7 +43,7 @@ app = gr.Blocks()
|
|
43 |
with app:
|
44 |
audio_input = gr.Audio(label="Upload Audio")
|
45 |
not_singing = gr.Checkbox(label="Check this box if this audio is not singing", value=False)
|
|
|
46 |
submit_btn = gr.Button("Submit", variant="primary")
|
47 |
-
|
48 |
-
submit_btn.click(vc_fn, [audio_input, not_singing], [audio_output])
|
49 |
app.launch()
|
|
|
16 |
|
17 |
model = Svc("logs/44k/G_199200.pth", "logs/44k/config.json", cluster_model_path="logs/44k/kmeans_10000.pt")
|
18 |
|
19 |
+
def predict(input_audio, vc_transform, not_singing,cluster_ratio, noise_scale):
|
20 |
if input_audio is None:
|
21 |
return "You need to upload an audio", None
|
22 |
sampling_rate, audio = input_audio
|
|
|
43 |
with app:
|
44 |
audio_input = gr.Audio(label="Upload Audio")
|
45 |
not_singing = gr.Checkbox(label="Check this box if this audio is not singing", value=False)
|
46 |
+
audio_output = gr.Audio(label="Output Audio", visible=False)
|
47 |
submit_btn = gr.Button("Submit", variant="primary")
|
48 |
+
submit_btn.click(predict, [audio_input, not_singing], [audio_output])
|
|
|
49 |
app.launch()
|