| import os | |
| import uvicorn | |
| from fastapi import FastAPI | |
| from fastapi.responses import RedirectResponse | |
| app = FastAPI(docs_url=None, redoc_url="/") | |
| def redirect_to_oneapi(): | |
| return RedirectResponse(url="http://localhost:8080/") | |
| def hello(): | |
| return {"message": "OneApi is running on port 8080", "oneapi_url": "http://localhost:8080/"} | |
| if __name__ == "__main__": | |
| uvicorn.run(app, host="0.0.0.0", port=7860) |