narrative_api / init_app.py
MJSHIN0122's picture
클론 경로 수정
2a6cd04
raw
history blame
544 Bytes
import os
from git import Repo
import sys
access_token = os.environ['AccessTokenToPrivate']
repo = Repo.clone_from(f"https://MJSHIN0122:{access_token}@huggingface.co/spaces/MJSHIN0122/narrative_api.git", "./repo")
print("Clone Done.")
repo.submodule_update(init=True)
print("Clone and submodule update done.")
sys.path.append(os.path.abspath("./repo"))
sys.path.append(os.path.abspath("./repo/api"))
sys.path.append(os.path.abspath("./repo/khala_network"))
sys.path.append(os.path.abspath("./repo/khala_network/src"))
import repo.api.main