Spaces:
Paused
Paused
File size: 423 Bytes
3a010aa |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
import os
def get_index_path_from_model(sid):
return next(
(
f
for f in [
os.path.join(root, name)
for root, _, files in os.walk(os.getenv("index_root"), topdown=False)
for name in files
if name.endswith(".index") and "trained" not in name
]
if sid.split(".")[0] in f
),
"",
)
|