PROSTLE commited on
Commit
895212c
·
1 Parent(s): f62e7e6

fix: use main() function as server entry point

Browse files
Files changed (2) hide show
  1. pyproject.toml +1 -1
  2. server/app.py +5 -2
pyproject.toml CHANGED
@@ -31,7 +31,7 @@ dependencies = [
31
  ]
32
 
33
  [project.scripts]
34
- server = "server.app:app"
35
 
36
  [[tool.uv.index]]
37
  url = "https://download.pytorch.org/whl/cpu"
 
31
  ]
32
 
33
  [project.scripts]
34
+ server = "server.app:main"
35
 
36
  [[tool.uv.index]]
37
  url = "https://download.pytorch.org/whl/cpu"
server/app.py CHANGED
@@ -8,7 +8,10 @@ sys.path.append(os.path.join(root, "backend"))
8
 
9
  from backend.app import app
10
 
11
- # This entry point satisfies OpenEnv and uv requirements
12
- if __name__ == "__main__":
13
  import uvicorn
14
  uvicorn.run(app, host="0.0.0.0", port=8000)
 
 
 
 
 
8
 
9
  from backend.app import app
10
 
11
+ def main():
 
12
  import uvicorn
13
  uvicorn.run(app, host="0.0.0.0", port=8000)
14
+
15
+ # This entry point satisfies OpenEnv and uv requirements
16
+ if __name__ == "__main__":
17
+ main()