Spaces:
Running on Zero
Running on Zero
Update src/webui.py
Browse files- src/webui.py +9 -3
src/webui.py
CHANGED
|
@@ -193,6 +193,10 @@ def show_hop_slider(pitch_detection_algo):
|
|
| 193 |
return gr.update(visible=False)
|
| 194 |
|
| 195 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 196 |
def update_audio_player(is_player_active, audio_path):
|
| 197 |
return gr.update(value=audio_path if is_player_active else None, visible=True if is_player_active else False)
|
| 198 |
|
|
@@ -313,9 +317,11 @@ if __name__ == '__main__':
|
|
| 313 |
inst_gain, index_rate, filter_radius, rms_mix_rate, f0_method, crepe_hop_length,
|
| 314 |
protect, pitch_all, reverb_rm_size, reverb_wet, reverb_dry, reverb_damping,
|
| 315 |
output_format, extra_denoise, steps],
|
| 316 |
-
outputs=[ai_cover]).success(
|
| 317 |
-
|
| 318 |
-
|
|
|
|
|
|
|
| 319 |
clear_btn.click(lambda: [0, 0, 0, 0, 0.5, 3, 0.25, 0.33, 'rmvpe+', 128, 0, 0.15, 0.2, 0.8, 0.7, 'mp3', None, True, 1],
|
| 320 |
outputs=[pitch, main_gain, backup_gain, inst_gain, index_rate, filter_radius, rms_mix_rate,
|
| 321 |
protect, f0_method, crepe_hop_length, pitch_all, reverb_rm_size, reverb_wet,
|
|
|
|
| 193 |
return gr.update(visible=False)
|
| 194 |
|
| 195 |
|
| 196 |
+
def clear_player():
|
| 197 |
+
return None
|
| 198 |
+
|
| 199 |
+
|
| 200 |
def update_audio_player(is_player_active, audio_path):
|
| 201 |
return gr.update(value=audio_path if is_player_active else None, visible=True if is_player_active else False)
|
| 202 |
|
|
|
|
| 317 |
inst_gain, index_rate, filter_radius, rms_mix_rate, f0_method, crepe_hop_length,
|
| 318 |
protect, pitch_all, reverb_rm_size, reverb_wet, reverb_dry, reverb_damping,
|
| 319 |
output_format, extra_denoise, steps],
|
| 320 |
+
outputs=[ai_cover]).success(clear_player,
|
| 321 |
+
outputs=[ai_cover_audio]
|
| 322 |
+
).success(update_audio_player,
|
| 323 |
+
inputs=[audio_player_checkbox, ai_cover],
|
| 324 |
+
outputs=[ai_cover_audio])
|
| 325 |
clear_btn.click(lambda: [0, 0, 0, 0, 0.5, 3, 0.25, 0.33, 'rmvpe+', 128, 0, 0.15, 0.2, 0.8, 0.7, 'mp3', None, True, 1],
|
| 326 |
outputs=[pitch, main_gain, backup_gain, inst_gain, index_rate, filter_radius, rms_mix_rate,
|
| 327 |
protect, f0_method, crepe_hop_length, pitch_all, reverb_rm_size, reverb_wet,
|