narrative_api / init_app.py
MJSHIN0122's picture
ν—ˆκΉ…νŽ˜μ΄μŠ€ νƒ€κ²Ÿ μˆ˜μ •
b330c33
raw
history blame contribute delete
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/khala_network.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