Manus3 / app.py
Ken Sang Tang
Update app.py
a73cf00 verified
raw
history blame
530 Bytes
from fastapi import FastAPI
import toml
import os
app = FastAPI()
# Load OPENMANUS_ENDPOINT_URL from env or config fallback
OPENMANUS_ENDPOINT_URL = os.getenv("OPENMANUS_ENDPOINT_URL")
if not OPENMANUS_ENDPOINT_URL:
config_path = "config/config.toml"
if os.path.exists(config_path):
config = toml.load(config_path)
OPENMANUS_ENDPOINT_URL = config.get("OPENMANUS_ENDPOINT_URL")
if not OPENMANUS_ENDPOINT_URL:
raise EnvironmentError("OPENMANUS_ENDPOINT_URL must be set in env or config/config.toml")