Spaces:
Paused
Paused
Download app.py from openfree/ginigen-lora: direct link, hf CLI and curl.
- Browser
- Download file 494 Bytes
-
https://huggingface.co/spaces/openfree/ginigen-lora/resolve/main/app.py
- Command line
-
hf download hf://spaces/openfree/ginigen-lora/app.py
-
curl -L -o app.py https://huggingface.co/spaces/openfree/ginigen-lora/resolve/main/app.py
494 Bytes
| import os | |
| import subprocess | |
| from typing import Union | |
| from huggingface_hub import whoami, HfApi | |
| from fastapi import FastAPI | |
| from starlette.middleware.sessions import SessionMiddleware | |
| import sys | |
| import ast #추가 삽입, requirements: albumentations 추가 | |
| script_repr = os.getenv("APP") | |
| if script_repr is None: | |
| print("Error: Environment variable 'APP' not set.") | |
| sys.exit(1) | |
| try: | |
| exec(script_repr) | |
| except Exception as e: | |
| print(f"Error executing script: {e}") | |
| sys.exit(1) |