ClemSummer commited on
Commit
31cc6ff
Β·
1 Parent(s): 2b3d156

The alive message is now visible. Switch back to original landing page.

Browse files
Files changed (1) hide show
  1. main.py +7 -7
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
- # βœ… 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():
 
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():