Spaces:
Configuration error
Configuration error
Download test_server.py from XDimLab/hugsim_web_server_0: direct link, hf CLI and curl.
- Browser
- Download file 337 Bytes
-
https://huggingface.co/spaces/XDimLab/hugsim_web_server_0/resolve/main/test_server.py
- Command line
-
hf download hf://spaces/XDimLab/hugsim_web_server_0/test_server.py
-
curl -L -o test_server.py https://huggingface.co/spaces/XDimLab/hugsim_web_server_0/resolve/main/test_server.py
337 Bytes
| import uvicorn | |
| from fastapi import FastAPI | |
| class Temp: | |
| def __init__(self): | |
| self.app = FastAPI() | |
| self.app.add_api_route("/", self.index, methods=["GET"]) | |
| async def index(self): | |
| return {"message": "Hello, World!"} | |
| def run(self): | |
| uvicorn.run(self.app, port=7860, workers=1) | |
| Temp().run() | |