File size: 544 Bytes
b7a937b
 
 
 
 
b330c33
b7a937b
 
 
 
 
 
 
2a6cd04
 
 
 
b7a937b
2a6cd04
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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