Spaces:
Sleeping
Sleeping
| import os | |
| import uvicorn | |
| import nest_asyncio | |
| from flask import Flask | |
| from fastapi import FastAPI | |
| app = FastAPI( | |
| title="SAVE RESTRICTED CONTENT", | |
| version="1.0.2", | |
| contact={ | |
| "name": "THE RESTRICTED BOT", | |
| "url": "https://t.me/AgainOwner", | |
| }, | |
| docs_url=None, | |
| redoc_url="/" | |
| ) | |
| def home(): | |
| return """ | |
| <center> | |
| <img src="/static/gagan.png" style="border-radius: 2px;"/>/> | |
| </center> | |
| <style> | |
| body { | |
| background: antiquewhite; | |
| display: flex; | |
| flex-direction: column; | |
| justify-content: space-between; | |
| height: 100vh; | |
| margin: 0; | |
| } | |
| footer { | |
| text-align: center; | |
| padding: 10px; | |
| background: antiquewhite; | |
| font-size: 1.2em; | |
| } | |
| </style> | |
| <footer> | |
| Made with ๐ by devgagan.in | |
| </footer> | |
| """ | |
| def status(): | |
| return {"message": "running"} | |
| if __name__ == "__main__": | |
| nest_asyncio.apply() | |
| uvicorn.run(app, host="0.0.0.0", port=5000) | |