Spaces:
Runtime error
Runtime error
Pedro de Carvalho commited on
Commit ·
fce1240
1
Parent(s): 4dfd938
Update app
Browse files
app.py
CHANGED
|
@@ -4,7 +4,7 @@ from pathlib import Path
|
|
| 4 |
from typing import Any, Literal
|
| 5 |
|
| 6 |
from fastapi import HTTPException
|
| 7 |
-
from fastapi.responses import FileResponse, HTMLResponse
|
| 8 |
from fastapi.staticfiles import StaticFiles
|
| 9 |
from gradio import Server
|
| 10 |
from pydantic import BaseModel, ConfigDict, Field
|
|
@@ -120,7 +120,7 @@ async def vite_favicon_alias():
|
|
| 120 |
@app.get("/")
|
| 121 |
async def root():
|
| 122 |
if (DIST_DIR / "index.html").exists():
|
| 123 |
-
return
|
| 124 |
return missing_build_response()
|
| 125 |
|
| 126 |
|
|
|
|
| 4 |
from typing import Any, Literal
|
| 5 |
|
| 6 |
from fastapi import HTTPException
|
| 7 |
+
from fastapi.responses import FileResponse, HTMLResponse
|
| 8 |
from fastapi.staticfiles import StaticFiles
|
| 9 |
from gradio import Server
|
| 10 |
from pydantic import BaseModel, ConfigDict, Field
|
|
|
|
| 120 |
@app.get("/")
|
| 121 |
async def root():
|
| 122 |
if (DIST_DIR / "index.html").exists():
|
| 123 |
+
return FileResponse(DIST_DIR / "index.html")
|
| 124 |
return missing_build_response()
|
| 125 |
|
| 126 |
|