Spaces:
Running
Running
Update src/modules/ui_updates.py
Browse files- src/modules/ui_updates.py +25 -25
src/modules/ui_updates.py
CHANGED
@@ -1,25 +1,25 @@
|
|
1 |
-
import gradio as gr
|
2 |
-
|
3 |
-
|
4 |
-
def show_hop_slider(pitch_detection_algo):
|
5 |
-
if pitch_detection_algo in ['mangio-crepe']:
|
6 |
-
return gr.update(visible=True)
|
7 |
-
else:
|
8 |
-
return gr.update(visible=False)
|
9 |
-
|
10 |
-
|
11 |
-
def update_f0_method(use_hybrid_methods):
|
12 |
-
if use_hybrid_methods:
|
13 |
-
return gr.update(choices=['hybrid[rmvpe+fcpe]', 'hybrid[rmvpe+crepe]', 'hybrid[crepe+rmvpe]', 'hybrid[crepe+fcpe]', 'hybrid[crepe+rmvpe+fcpe]'], value='hybrid[rmvpe+fcpe]')
|
14 |
-
else:
|
15 |
-
return gr.update(choices=['rmvpe+', 'fcpe', 'rmvpe', 'mangio-crepe', 'crepe'], value='rmvpe+')
|
16 |
-
|
17 |
-
|
18 |
-
def update_button_text():
|
19 |
-
return gr.update(label="
|
20 |
-
|
21 |
-
def update_button_text_voc():
|
22 |
-
return gr.update(label="
|
23 |
-
|
24 |
-
def update_button_text_inst():
|
25 |
-
return gr.update(label="
|
|
|
1 |
+
import gradio as gr
|
2 |
+
|
3 |
+
|
4 |
+
def show_hop_slider(pitch_detection_algo):
|
5 |
+
if pitch_detection_algo in ['mangio-crepe']:
|
6 |
+
return gr.update(visible=True)
|
7 |
+
else:
|
8 |
+
return gr.update(visible=False)
|
9 |
+
|
10 |
+
|
11 |
+
def update_f0_method(use_hybrid_methods):
|
12 |
+
if use_hybrid_methods:
|
13 |
+
return gr.update(choices=['hybrid[rmvpe+fcpe]', 'hybrid[rmvpe+crepe]', 'hybrid[crepe+rmvpe]', 'hybrid[crepe+fcpe]', 'hybrid[crepe+rmvpe+fcpe]'], value='hybrid[rmvpe+fcpe]')
|
14 |
+
else:
|
15 |
+
return gr.update(choices=['rmvpe+', 'fcpe', 'rmvpe', 'mangio-crepe', 'crepe'], value='rmvpe+')
|
16 |
+
|
17 |
+
|
18 |
+
def update_button_text():
|
19 |
+
return gr.update(label="Upload different audio file")
|
20 |
+
|
21 |
+
def update_button_text_voc():
|
22 |
+
return gr.update(label="Upload different vocals")
|
23 |
+
|
24 |
+
def update_button_text_inst():
|
25 |
+
return gr.update(label="Upload different instrumental")
|