1
0
mirror of https://github.com/fumiama/Retrieval-based-Voice-Conversion-WebUI.git synced 2026-06-05 09:10:25 +08:00

chore(format): run black on dev (#94)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2024-11-28 03:21:10 +09:00
committed by GitHub
parent a8783c6639
commit d3add81469
10 changed files with 126 additions and 47 deletions

3
web.py
View File

@@ -144,12 +144,14 @@ outside_index_root = os.getenv("outside_index_root")
names = [""]
index_paths = [""]
def lookup_names(weight_root):
global names
for name in os.listdir(weight_root):
if name.endswith(".pth"):
names.append(name)
def lookup_indices(index_root):
global index_paths
for root, _, files in os.walk(index_root, topdown=False):
@@ -157,6 +159,7 @@ def lookup_indices(index_root):
if name.endswith(".index") and "trained" not in name:
index_paths.append(str(pathlib.Path(root, name)))
lookup_names(weight_root)
lookup_indices(index_root)
lookup_indices(outside_index_root)