Spaces:
Running
Running
Update main.py
Browse files
main.py
CHANGED
@@ -62,6 +62,7 @@ from fastapi.security import OAuth2PasswordBearer, OAuth2PasswordRequestForm
|
|
62 |
from fastapi import Depends, HTTPException, status
|
63 |
from fastapi.openapi.utils import get_openapi
|
64 |
from fastapi.responses import StreamingResponse, JSONResponse, FileResponse
|
|
|
65 |
from fastapi import Request, Header
|
66 |
from fastapi import Body, Query
|
67 |
from fastapi.staticfiles import StaticFiles
|
@@ -144,15 +145,15 @@ trans = SyncTranslator()
|
|
144 |
|
145 |
app.mount("/static", StaticFiles(directory="static"), name="static")
|
146 |
|
147 |
-
|
148 |
app = FastAPI(docs_url=None, redoc_url=None)
|
149 |
app.include_router(fluxai_router, prefix="/api/v1")
|
150 |
app.include_router(whisper_router, prefix="/api/v1")
|
151 |
app.include_router(instagram_router, prefix="/api/v1")
|
152 |
|
153 |
-
@app.get("/")
|
154 |
async def read_index():
|
155 |
-
|
|
|
156 |
|
157 |
timeout = 100
|
158 |
|
|
|
62 |
from fastapi import Depends, HTTPException, status
|
63 |
from fastapi.openapi.utils import get_openapi
|
64 |
from fastapi.responses import StreamingResponse, JSONResponse, FileResponse
|
65 |
+
from fastapi.responses import *
|
66 |
from fastapi import Request, Header
|
67 |
from fastapi import Body, Query
|
68 |
from fastapi.staticfiles import StaticFiles
|
|
|
145 |
|
146 |
app.mount("/static", StaticFiles(directory="static"), name="static")
|
147 |
|
|
|
148 |
app = FastAPI(docs_url=None, redoc_url=None)
|
149 |
app.include_router(fluxai_router, prefix="/api/v1")
|
150 |
app.include_router(whisper_router, prefix="/api/v1")
|
151 |
app.include_router(instagram_router, prefix="/api/v1")
|
152 |
|
153 |
+
@app.get("/", response_class=HTMLResponse)
|
154 |
async def read_index():
|
155 |
+
with open("static/index.html") as f:
|
156 |
+
return HTMLResponse(content=f.read(), status_code=200)
|
157 |
|
158 |
timeout = 100
|
159 |
|