Spaces:
Runtime error
Runtime error
Update server.py
Browse files
server.py
CHANGED
|
@@ -22,13 +22,11 @@ app.add_middleware(
|
|
| 22 |
allow_headers=["*"],
|
| 23 |
)
|
| 24 |
|
| 25 |
-
# ─── (Optional) serve any JS/CSS under ./static/ ────────────────────────────────
|
| 26 |
app.mount("/static", StaticFiles(directory="static"), name="static")
|
| 27 |
|
| 28 |
-
|
| 29 |
@app.get("/", response_class=HTMLResponse)
|
| 30 |
async def root():
|
| 31 |
-
with open("index.html", "r", encoding="utf-8") as f:
|
| 32 |
return HTMLResponse(f.read())
|
| 33 |
|
| 34 |
|
|
|
|
| 22 |
allow_headers=["*"],
|
| 23 |
)
|
| 24 |
|
|
|
|
| 25 |
app.mount("/static", StaticFiles(directory="static"), name="static")
|
| 26 |
|
|
|
|
| 27 |
@app.get("/", response_class=HTMLResponse)
|
| 28 |
async def root():
|
| 29 |
+
with open("static/index.html", "r", encoding="utf-8") as f:
|
| 30 |
return HTMLResponse(f.read())
|
| 31 |
|
| 32 |
|