Skip to content

Commit

Permalink
Merge pull request #70 from AIGODLIKE/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
KarryCharon authored Jan 6, 2025
2 parents 43839ce + ee6f79f commit 8ad96db
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,8 @@ async def fetch_config(request: web.Request):
mcfg["workflows"] = workflows
dir_tags = find_tags(name)
if dir_tags:
if "tags" not in mcfg:
mcfg["tags"] = []
mcfg["tags"].extend(dir_tags)
mcfg["dir_tags"] = dir_tags
# mcfg["cover"] = urllib.parse.quote(path_to_url(mcfg["cover"]))
Expand Down Expand Up @@ -824,13 +826,13 @@ def add_static_resource(prefix, path, pprefix=MOUNT_ROOT, limit=False):


def init():
modelpath_map = ModelManager.model_path_dict()
for mtype in modelpath_map:
for path in modelpath_map[mtype][0]:
if not Path(path).exists():
continue
add_static_resource(path, path, "", limit=True)
add_static_resource("", CUR_PATH.as_posix())
# modelpath_map = ModelManager.model_path_dict()
# for mtype in modelpath_map:
# for path in modelpath_map[mtype][0]:
# if not Path(path).exists():
# continue
# add_static_resource(path, path, "", limit=True)
add_static_resource("", CUR_PATH.joinpath("loader").as_posix(), pprefix="/cs/loader")


init()
Expand Down

0 comments on commit 8ad96db

Please sign in to comment.