RandomCatLover's picture
Upload 2 files
f557dc8 verified
raw
history blame contribute delete
661 Bytes
import os
from huggingface_hub import HfApi
destination = 'core'
if os.path.exists('.env'):
from dotenv import load_dotenv
load_dotenv()
if not os.path.exists(destination):
# security by obscurity
import subprocess
repo_url = os.getenv("GIT_CORE")
command = f'git clone {repo_url} {destination}'
try:
subprocess.check_output(command, stderr=subprocess.STDOUT, shell=True)#, env=env)
print('Repository cloned successfully.')
except subprocess.CalledProcessError as e:
print(f'Error cloning repository') #{e.output.decode()}')
from core.main import demo
# demo.queue(concurrency_count=3)
demo.launch()