rahul2124 commited on
Commit
9caeadb
·
verified ·
1 Parent(s): 99aa2be

Upload folder using huggingface_hub

Browse files
Files changed (5) hide show
  1. pyproject.toml +4 -0
  2. requirements.txt +8 -7
  3. server/app.py +16 -0
  4. src/sql_arena/server.py +6 -2
  5. uv.lock +0 -0
pyproject.toml CHANGED
@@ -18,8 +18,12 @@ dependencies = [
18
  "pydantic>=2.5.0",
19
  "websockets>=12.0",
20
  "openai>=1.0.0",
 
21
  ]
22
 
 
 
 
23
  [project.optional-dependencies]
24
  dev = [
25
  "pytest>=7.0",
 
18
  "pydantic>=2.5.0",
19
  "websockets>=12.0",
20
  "openai>=1.0.0",
21
+ "openenv-core>=0.2.0",
22
  ]
23
 
24
+ [project.scripts]
25
+ server = "src.sql_arena.server:main"
26
+
27
  [project.optional-dependencies]
28
  dev = [
29
  "pytest>=7.0",
requirements.txt CHANGED
@@ -1,7 +1,8 @@
1
- fastapi>=0.104.0
2
- uvicorn[standard]>=0.24.0
3
- pydantic>=2.5.0
4
- websockets>=12.0
5
- openai>=1.0.0
6
- pytest>=7.0
7
- httpx>=0.25.0
 
 
1
+ fastapi>=0.104.0
2
+ uvicorn[standard]>=0.24.0
3
+ pydantic>=2.5.0
4
+ websockets>=12.0
5
+ openai>=1.0.0
6
+ openenv-core>=0.2.0
7
+ pytest>=7.0
8
+ httpx>=0.25.0
server/app.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Server entry point for OpenEnv compatibility.
3
+ This file re-exports the FastAPI app from the main server module.
4
+ """
5
+
6
+ import sys
7
+ import os
8
+
9
+ # Add parent directory to path so imports work
10
+ sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
11
+
12
+ from src.sql_arena.server import app
13
+
14
+ if __name__ == "__main__":
15
+ import uvicorn
16
+ uvicorn.run(app, host="0.0.0.0", port=7860)
src/sql_arena/server.py CHANGED
@@ -259,7 +259,11 @@ async def websocket_endpoint(websocket: WebSocket):
259
  # =====================================================
260
  # Entry point
261
  # =====================================================
 
 
 
 
 
262
 
263
  if __name__ == "__main__":
264
- import uvicorn
265
- uvicorn.run(app, host="0.0.0.0", port=7860)
 
259
  # =====================================================
260
  # Entry point
261
  # =====================================================
262
+ def main():
263
+ """Entry point for the server command."""
264
+ import uvicorn
265
+ uvicorn.run(app, host="0.0.0.0", port=7860)
266
+
267
 
268
  if __name__ == "__main__":
269
+ main()
 
uv.lock ADDED
The diff for this file is too large to render. See raw diff