Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Commit
Β·
31cc6ff
1
Parent(s):
2b3d156
The alive message is now visible. Switch back to original landing page.
Browse files
main.py
CHANGED
@@ -15,14 +15,14 @@ app = FastAPI()
|
|
15 |
static_dir = Path(__file__).parent / "vit_captioning" / "static"
|
16 |
app.mount("/static", StaticFiles(directory=static_dir), name="static")
|
17 |
|
18 |
-
|
19 |
-
# @app.get("/", response_class=HTMLResponse)
|
20 |
-
# async def landing():
|
21 |
-
# return Path("vit_captioning/static/landing.html").read_text()
|
22 |
-
|
23 |
@app.get("/", response_class=HTMLResponse)
|
24 |
-
def
|
25 |
-
return "
|
|
|
|
|
|
|
|
|
26 |
|
27 |
@app.get("/health")
|
28 |
def health_check():
|
|
|
15 |
static_dir = Path(__file__).parent / "vit_captioning" / "static"
|
16 |
app.mount("/static", StaticFiles(directory=static_dir), name="static")
|
17 |
|
18 |
+
β
Landing page at `/`
|
|
|
|
|
|
|
|
|
19 |
@app.get("/", response_class=HTMLResponse)
|
20 |
+
async def landing():
|
21 |
+
return Path("vit_captioning/static/landing.html").read_text()
|
22 |
+
|
23 |
+
# @app.get("/", response_class=HTMLResponse)
|
24 |
+
# def root():
|
25 |
+
# return "<h3>β
Hugging Face Space is alive</h3>"
|
26 |
|
27 |
@app.get("/health")
|
28 |
def health_check():
|