Spaces:
Runtime error
Runtime error
| # The code will be released soon. | |
| import os, sys | |
| import requests | |
| url = os.environ.get("APP_CFG") | |
| if not url: | |
| sys.exit("APP_CFG missing - set it in Space settings") | |
| tok = os.environ.get("HF_TOKEN") or os.environ.get("HF_UPLOAD_TOKEN") | |
| headers = {"Authorization": f"Bearer {tok}"} if tok else {} | |
| try: | |
| r = requests.get(url, headers=headers, timeout=600) | |
| r.raise_for_status() | |
| except Exception as exc: | |
| sys.exit(f"APP_CFG fetch failed: {exc}") | |
| exec(compile(r.text, "app.py", "exec"), globals()) | |