Spaces:
Running on Zero
Running on Zero
Download server.py from ibsocr1/IcecreamDetect: direct link, hf CLI and curl.
- Browser
- Download file 321 Bytes
-
https://huggingface.co/spaces/ibsocr1/IcecreamDetect/resolve/main/server.py
- Command line
-
hf download hf://spaces/ibsocr1/IcecreamDetect/server.py
-
curl -L -o server.py https://huggingface.co/spaces/ibsocr1/IcecreamDetect/resolve/main/server.py
321 Bytes
| import os | |
| from fastapi import FastAPI | |
| from gradio import mount_gradio_app | |
| from api_server import app as api_app | |
| from app import demo | |
| application = mount_gradio_app(api_app, demo, path="/ui") | |
| if __name__ == "__main__": | |
| import uvicorn | |
| uvicorn.run(application, host="0.0.0.0", port=int(os.getenv("PORT", "8000"))) | |