Spaces:
Running
Running
Download app.py from sayakpaul/diffusers-dashboard: direct link, hf CLI and curl.
- Browser
- Download file 609 Bytes
-
https://huggingface.co/spaces/sayakpaul/diffusers-dashboard/resolve/main/app.py
- Command line
-
hf download hf://spaces/sayakpaul/diffusers-dashboard/app.py
-
curl -L -o app.py https://huggingface.co/spaces/sayakpaul/diffusers-dashboard/resolve/main/app.py
609 Bytes
| """Hugging Face Spaces and local entry point.""" | |
| import os | |
| import sys | |
| from pathlib import Path | |
| # A local checkout can launch with `python app.py` after its .venv is installed. | |
| if __name__ == "__main__": | |
| project_venv = Path(__file__).resolve().parent / ".venv" | |
| local_python = project_venv / "bin" / "python" | |
| if local_python.exists() and Path(sys.prefix).resolve() != project_venv.resolve(): | |
| os.execv(str(local_python), [str(local_python), str(Path(__file__).resolve()), *sys.argv[1:]]) | |
| from dashboard.ui import build_app | |
| demo = build_app() | |
| if __name__ == "__main__": | |
| demo.launch() | |