LordXido commited on
Commit
b92ad8b
·
verified ·
1 Parent(s): aa72ce4

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -0
app.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from fastapi import FastAPI
2
+ from fastapi.responses import HTMLResponse
3
+ import uvicorn
4
+
5
+ app = FastAPI()
6
+
7
+ @app.get("/", response_class=HTMLResponse)
8
+ def serve_index():
9
+ with open("index.html", "r") as file:
10
+ return file.read()
11
+
12
+ if __name__ == "__main__":
13
+ uvicorn.run(app, host="0.0.0.0", port=7860)