""" Open WebUI Hugging Face Space configuration """ import os import subprocess import sys # Check if we're running in a Hugging Face Space if "SPACE_ID" in os.environ: print("Running in Hugging Face Space") # Start the Open WebUI server subprocess.run(["uvicorn", "open_webui.main:app", "--host", "0.0.0.0", "--port", "7860", "--forwarded-allow-ips", "*"]) else: print("Not running in Hugging Face Space. Please use the Dockerfile to build and run the application.") sys.exit(1)