Spaces:
Runtime error
Runtime error
"""This files enables serving Panel apps on Hugging Face Spaces""" | |
import os | |
from subprocess import Popen | |
# CONFIGURE YOUR SETTINGS HERE | |
# Space separated list of .py or .ipynb files to serve | |
APP = "solara.website.pages" | |
# NORMALLY NO NEED TO CHANGE THE BELOW | |
PORT = os.environ.get("PORT", "7860") | |
ADDRESS = "0.0.0.0" | |
command = [ | |
"solara", | |
"run", | |
APP, | |
"--port", | |
PORT, | |
"--host", | |
ADDRESS, | |
"--log-level-uvicorn", | |
"debug" | |
] | |
#if os.name != "nt": | |
# command = command + ["--num-procs", "4", "--num-threads", "4"] | |
print(" ".join(command)) | |
worker = Popen(command) | |
worker.wait() |