makakwastaken commited on
Commit
1e36d64
·
1 Parent(s): 882d74d

Run uvicorn on 7860 and present docs at root level

Browse files
Files changed (2) hide show
  1. app.py +1 -2
  2. main.py → server.py +3 -2
app.py CHANGED
@@ -1,5 +1,4 @@
1
  import subprocess
2
 
3
  # Start HF-MaskCut with uvicorn
4
-
5
- subprocess.run(["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"])
 
1
  import subprocess
2
 
3
  # Start HF-MaskCut with uvicorn
4
+ subprocess.run("uvicorn server:app --host 0.0.0.0 --port 7860", shell=True)
 
main.py → server.py RENAMED
@@ -21,12 +21,13 @@ import sys
21
  import uvicorn
22
 
23
  app = FastAPI(
24
- title="ML Model",
25
  description="Description of the ML Model",
26
  version="0.0.1",
27
  terms_of_service=None,
28
  contact=None,
29
- license_info=None
 
30
  )
31
 
32
  # Allow CORS for local debugging
 
21
  import uvicorn
22
 
23
  app = FastAPI(
24
+ title="AdVisual MaskCut Model",
25
  description="Description of the ML Model",
26
  version="0.0.1",
27
  terms_of_service=None,
28
  contact=None,
29
+ license_info=None,
30
+ docs_url="/",
31
  )
32
 
33
  # Allow CORS for local debugging