Skip to content

Commit

Permalink
fix: select model fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ArkanDash committed Sep 9, 2023
1 parent 982bffb commit c37cffc
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion infer.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,15 @@ def get_vc(sid, to_return_protect0):
net_g = net_g.float()
vc = VC(tgt_sr, config)
n_spk = cpt["config"][-3]
selected_index = gr.Dropdown.update(value=weights_index[0])
weights_index = []
for _, _, index_files in os.walk(index_root):
for file in index_files:
if file.endswith('.index') and "trained" not in file:
weights_index.append(os.path.join(index_root, file))
if weights_index == []:
selected_index = gr.Dropdown.update(value="")
else

This comment has been minimized.

Copy link
@dirname

dirname Sep 11, 2023

Missing a colon after the else statement.

This comment has been minimized.

Copy link
@enterprisium

enterprisium Sep 19, 2023

you forgot ":" next 2 ELSE

line 272

selected_index = gr.Dropdown.update(value=weights_index[0])
for index, model_index in enumerate(weights_index):
if selected_model in model_index:
selected_index = gr.Dropdown.update(value=weights_index[index])
Expand Down

0 comments on commit c37cffc

Please sign in to comment.