thomasht86 commited on
Commit
a886be1
·
verified ·
1 Parent(s): 3ace0b9

Deploy to HF Space

Browse files
Files changed (2) hide show
  1. __pycache__/main.cpython-310.pyc +0 -0
  2. main.py +3 -2
__pycache__/main.cpython-310.pyc CHANGED
Binary files a/__pycache__/main.cpython-310.pyc and b/__pycache__/main.cpython-310.pyc differ
 
main.py CHANGED
@@ -24,7 +24,6 @@ from fasthtml.common import (
24
  Script,
25
  StreamingResponse,
26
  fast_app,
27
- serve,
28
  )
29
  from PIL import Image
30
  from shad4fast import ShadHead
@@ -43,6 +42,7 @@ from frontend.app import (
43
  SimMapButtonReady,
44
  )
45
  from frontend.layout import Layout
 
46
 
47
  highlight_js_theme_link = Link(id="highlight-theme", rel="stylesheet", href="")
48
  highlight_js_theme = Script(src="/static/js/highlightjs-theme.js")
@@ -421,4 +421,5 @@ def get():
421
  if __name__ == "__main__":
422
  HOT_RELOAD = os.getenv("HOT_RELOAD", "False").lower() == "true"
423
  logger.info(f"Starting app with hot reload: {HOT_RELOAD}")
424
- serve(port=7860, reload=HOT_RELOAD)
 
 
24
  Script,
25
  StreamingResponse,
26
  fast_app,
 
27
  )
28
  from PIL import Image
29
  from shad4fast import ShadHead
 
42
  SimMapButtonReady,
43
  )
44
  from frontend.layout import Layout
45
+ import uvicorn
46
 
47
  highlight_js_theme_link = Link(id="highlight-theme", rel="stylesheet", href="")
48
  highlight_js_theme = Script(src="/static/js/highlightjs-theme.js")
 
421
  if __name__ == "__main__":
422
  HOT_RELOAD = os.getenv("HOT_RELOAD", "False").lower() == "true"
423
  logger.info(f"Starting app with hot reload: {HOT_RELOAD}")
424
+ uvicorn.run("main:app", host="0.0.0.0", timeout_worker_healthcheck=30, port=7860)
425
+ # serve(port=7860, reload=HOT_RELOAD)