Spaces:
Running
Running
Download app.py from KAISTEdlab/picon-demo: direct link, hf CLI and curl.
- Browser
- Download file 566 Bytes
-
https://huggingface.co/spaces/KAISTEdlab/picon-demo/resolve/main/app.py
- Command line
-
hf download hf://spaces/KAISTEdlab/picon-demo/app.py
-
curl -L -o app.py https://huggingface.co/spaces/KAISTEdlab/picon-demo/resolve/main/app.py
566 Bytes
| """ | |
| PICon Demo — HuggingFace Space entry point. | |
| Serves the static demo page (index.html + assets) via FastAPI on port 7860. | |
| All API calls from the browser go directly to the Railway backend. | |
| """ | |
| from fastapi import FastAPI | |
| from fastapi.responses import FileResponse | |
| from fastapi.staticfiles import StaticFiles | |
| import uvicorn | |
| app = FastAPI() | |
| async def root(): | |
| return FileResponse("index.html") | |
| app.mount("/assets", StaticFiles(directory="assets"), name="assets") | |
| if __name__ == "__main__": | |
| uvicorn.run(app, host="0.0.0.0", port=7860) | |