Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -88,16 +88,16 @@ if __name__ == '__main__':
|
|
88 |
args, unknown = parser.parse_known_args()
|
89 |
load_hubert()
|
90 |
models = []
|
91 |
-
with open("
|
92 |
models_info = json.load(f)
|
93 |
for name, info in models_info.items():
|
94 |
if not info['enable']:
|
95 |
continue
|
96 |
title = info['title']
|
97 |
-
cover = f"
|
98 |
-
index = f"
|
99 |
-
npy = f"
|
100 |
-
cpt = torch.load(f"
|
101 |
tgt_sr = cpt["config"][-1]
|
102 |
if_f0 = cpt.get("f0", 1)
|
103 |
if if_f0 == 1:
|
|
|
88 |
args, unknown = parser.parse_known_args()
|
89 |
load_hubert()
|
90 |
models = []
|
91 |
+
with open("Weights/model_info.json", "r", encoding="utf-8") as f:
|
92 |
models_info = json.load(f)
|
93 |
for name, info in models_info.items():
|
94 |
if not info['enable']:
|
95 |
continue
|
96 |
title = info['title']
|
97 |
+
cover = f"Weights/{name}/{info['cover']}"
|
98 |
+
index = f"Weights/{name}/{info['feature_retrieval_library']}"
|
99 |
+
npy = f"Weights/{name}/{info['feature_file']}"
|
100 |
+
cpt = torch.load(f"Weights/{name}/{name}.pth", map_location="cpu")
|
101 |
tgt_sr = cpt["config"][-1]
|
102 |
if_f0 = cpt.get("f0", 1)
|
103 |
if if_f0 == 1:
|