Spaces:
Running
Running
File size: 329 Bytes
cc5f8ce 9bf2313 cc5f8ce 9bf2313 cc5f8ce ee97e7d cc5f8ce | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | from fastapi import FastAPI
from fastapi.responses import HTMLResponse
import os
app = FastAPI()
@app.get("/", response_class=HTMLResponse)
def root():
with open("index.html", "r", encoding="utf-8") as f:
return f.read()
if __name__ == "__main__":
import uvicorn
uvicorn.run(app, host="0.0.0.0", port=7860) |