Skip to content

Commit 19b0cb3

Browse files
authored
Update full_inference.py
1 parent 46f50fa commit 19b0cb3

File tree

1 file changed

+32
-30
lines changed

1 file changed

+32
-30
lines changed

tabs/full_inference.py

Lines changed: 32 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -240,36 +240,6 @@ def change_choices():
240240

241241

242242

243-
def update_dropdown_visibility(checkbox):
244-
245-
return gr.update(visible=checkbox)
246-
247-
def update_reverb_sliders_visibility(reverb_checked):
248-
249-
return {
250-
reverb_room_size: gr.update(visible=reverb_checked),
251-
reverb_damping: gr.update(visible=reverb_checked),
252-
reverb_wet_gain: gr.update(visible=reverb_checked),
253-
reverb_dry_gain: gr.update(visible=reverb_checked),
254-
reverb_width: gr.update(visible=reverb_checked),
255-
}
256-
257-
def update_visibility_infer_backing(infer_backing_vocals):
258-
259-
visible = infer_backing_vocals
260-
261-
return (
262-
{"visible": visible, "__type__": "update"},
263-
{"visible": visible, "__type__": "update"},
264-
{"visible": visible, "__type__": "update"},
265-
{"visible": visible, "__type__": "update"},
266-
{"visible": visible, "__type__": "update"},
267-
)
268-
269-
def update_hop_length_visibility(pitch_extract_value):
270-
271-
return gr.update(visible=pitch_extract_value in ["crepe", "crepe-tiny"])
272-
273243

274244

275245

@@ -906,6 +876,38 @@ def full_inference_tab():
906876

907877

908878

879+
def update_dropdown_visibility(checkbox):
880+
881+
return gr.update(visible=checkbox)
882+
883+
def update_reverb_sliders_visibility(reverb_checked):
884+
885+
return {
886+
reverb_room_size: gr.update(visible=reverb_checked),
887+
reverb_damping: gr.update(visible=reverb_checked),
888+
reverb_wet_gain: gr.update(visible=reverb_checked),
889+
reverb_dry_gain: gr.update(visible=reverb_checked),
890+
reverb_width: gr.update(visible=reverb_checked),
891+
}
892+
893+
def update_visibility_infer_backing(infer_backing_vocals):
894+
895+
visible = infer_backing_vocals
896+
897+
return (
898+
{"visible": visible, "__type__": "update"},
899+
{"visible": visible, "__type__": "update"},
900+
{"visible": visible, "__type__": "update"},
901+
{"visible": visible, "__type__": "update"},
902+
{"visible": visible, "__type__": "update"},
903+
)
904+
905+
def update_hop_length_visibility(pitch_extract_value):
906+
907+
return gr.update(visible=pitch_extract_value in ["crepe", "crepe-tiny"])
908+
909+
910+
909911
refresh_button.click(
910912
fn=change_choices,
911913
inputs=[],

0 commit comments

Comments
 (0)