Spaces:
Build error
Build error
Download run.py from c-gohlke/LitRL-Inference: direct link, hf CLI and curl.
- Browser
- Download file 681 Bytes
-
https://huggingface.co/spaces/c-gohlke/LitRL-Inference/resolve/main/run.py
- Command line
-
hf download hf://spaces/c-gohlke/LitRL-Inference/run.py
-
curl -L -o run.py https://huggingface.co/spaces/c-gohlke/LitRL-Inference/resolve/main/run.py
681 Bytes
| if __name__ == "__main__": # noqa: INP001 | |
| import argparse | |
| import uvicorn | |
| from src.app import create_app | |
| parser = argparse.ArgumentParser() | |
| parser.add_argument("--host", type=str, default="0.0.0.0") # nosec | |
| parser.add_argument("--port", type=int, default=7860) | |
| parser.add_argument("--log", type=str, default="info") | |
| parser.add_argument("--reload", action="store_true", help="Reload flag") | |
| args = parser.parse_args() | |
| config = uvicorn.Config( | |
| app=create_app(), | |
| host=args.host, | |
| port=args.port, | |
| log_level=args.log, | |
| reload=args.reload, | |
| ) | |
| server = uvicorn.Server(config=config) | |
| server.run() | |