File size: 366 Bytes
97d2bf0 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
import os
from dotenv import load_dotenv
from subprocess import Popen
load_dotenv()
my_env = os.environ.copy()
#
# Please set your username and your Space name
#
my_env["HF_SPACE"] = "embed/pplonski/interactive-presentation"
command = ["mercury", "run", f"0.0.0.0:{os.environ.get('PORT', 7860)}"]
print(command)
worker = Popen(command, env=my_env)
worker.wait() |