discord-bot / keepalive.py
xcx0902's picture
Upload folder using huggingface_hub
5f841df verified
raw
history blame contribute delete
325 Bytes
from fastapi import FastAPI
from fastapi.responses import HTMLResponse
import os
keepalive = FastAPI()
@keepalive.get("/", response_class=HTMLResponse)
def root():
return open("index.html").read()
@keepalive.head("/")
def root_head():
return "OK"
os.system("python app.py 1>/dev/null 2>/dev/null &")