Download app.py from inflaton/pakdd_mrd: direct link, hf CLI and curl.
- Browser
- Download file 586 Bytes
-
https://huggingface.co/spaces/inflaton/pakdd_mrd/resolve/main/app.py
- Command line
-
hf download hf://spaces/inflaton/pakdd_mrd/app.py
-
curl -L -o app.py https://huggingface.co/spaces/inflaton/pakdd_mrd/resolve/main/app.py
586 Bytes
| """Hugging Face Spaces entry point for the shared demo.""" | |
| import os | |
| # On Spaces this must be imported before the demo initializes PyTorch. Keep the | |
| # launcher usable locally when the platform's preinstalled package is absent. | |
| try: | |
| import spaces | |
| except ModuleNotFoundError as exc: | |
| if exc.name != "spaces" or os.environ.get("SPACE_ID"): | |
| raise | |
| spaces = None | |
| from demo import app as demo | |
| if spaces is not None: | |
| demo.live_score = spaces.GPU(duration=60)(demo.live_score) | |
| demo.build().launch(server_name="0.0.0.0", server_port=int(os.environ.get("PORT", "7860"))) | |