AItool commited on
Commit
23b834b
·
verified ·
1 Parent(s): aeb9746

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +7 -2
main.py CHANGED
@@ -13,5 +13,10 @@ def index():
13
  Card('A Fancy Card :)')
14
  )
15
 
16
- # Correct way to launch
17
- serve()
 
 
 
 
 
 
13
  Card('A Fancy Card :)')
14
  )
15
 
16
+
17
+
18
+ if __name__ == "__main__":
19
+ import uvicorn
20
+ uvicorn.run(app, host="0.0.0.0", port=int(os.environ.get("PORT", 7860)))
21
+ # Correct way to launch
22
+ serve()