q6 commited on
Commit
a45c963
·
1 Parent(s): e3ffedc

Simplify health response and disable SSR

Browse files
Files changed (2) hide show
  1. API.md +1 -1
  2. app.py +2 -1
API.md CHANGED
@@ -8,7 +8,7 @@ Use the Space URL as the base URL. Every endpoint requires `p` to match the lowe
8
  GET /health?p=PASSWORD
9
  ```
10
 
11
- Returns `{"status":"ok"}` when the application is ready.
12
 
13
  ## Generate
14
 
 
8
  GET /health?p=PASSWORD
9
  ```
10
 
11
+ Returns `{"status":true}` when the application is ready.
12
 
13
  ## Generate
14
 
app.py CHANGED
@@ -351,7 +351,7 @@ def require_pass(p: str = Query(...)):
351
 
352
  @api.get("/health", dependencies=[Depends(require_pass)])
353
  def health():
354
- return {"status": "ok"}
355
 
356
 
357
  @api.get("/system_stats", dependencies=[Depends(require_pass)])
@@ -458,6 +458,7 @@ if __name__ == "__main__":
458
  demo.launch(
459
  server_name="0.0.0.0",
460
  server_port=PORT,
 
461
  css_paths="style.css",
462
  head='<link rel="icon" href="data:;base64,=">',
463
  _app=api,
 
351
 
352
  @api.get("/health", dependencies=[Depends(require_pass)])
353
  def health():
354
+ return {"status": True}
355
 
356
 
357
  @api.get("/system_stats", dependencies=[Depends(require_pass)])
 
458
  demo.launch(
459
  server_name="0.0.0.0",
460
  server_port=PORT,
461
+ ssr_mode=False,
462
  css_paths="style.css",
463
  head='<link rel="icon" href="data:;base64,=">',
464
  _app=api,