Download app.py from hf1024/grok-api: direct link, hf CLI and curl.
- Browser
- Download file 552 Bytes
-
https://huggingface.co/spaces/hf1024/grok-api/resolve/main/app.py
- Command line
-
hf download hf://spaces/hf1024/grok-api/app.py
-
curl -L -o app.py https://huggingface.co/spaces/hf1024/grok-api/resolve/main/app.py
552 Bytes
| # !/usr/bin/python3 | |
| # -*- coding: utf-8 -*- | |
| """ | |
| @Author : Ailove | |
| ------------------------------------ | |
| @File : app.py.py | |
| @CreateTime : 2025/5/22 18:02 | |
| ------------------------------------ | |
| """ | |
| import logging | |
| from fastapi import FastAPI | |
| from routes import router | |
| # 配置日志 | |
| logging.basicConfig(level=logging.INFO) | |
| logger = logging.getLogger(__name__) | |
| app = FastAPI(title="Image Similarity Service") | |
| app.include_router(router) | |
| if __name__ == "__main__": | |
| import uvicorn | |
| uvicorn.run(app, host="0.0.0.0", port=7860) | |