Spaces:
Running
Running
from os import environ, chdir | |
from subprocess import run, PIPE | |
# Install Demo Application | |
run(["git", "clone", | |
f"https://{environ['GITHUB_TOKEN']}@github.com/neongeckocom/brainforge-webapp", | |
"-b", environ["GITHUB_BRANCH"]]) | |
run(["pip", "install", "./brainforge-webapp"]) | |
# Get Demo Commit ID | |
chdir("brainforge-webapp") | |
commit = run(["git", "rev-parse", "--short", "HEAD"], stdout=PIPE).stdout.decode('utf-8').strip() | |
environ["GH_COMMIT"] = commit | |
from brainforge_webapp.app import run | |
run() | |