Spaces:
Sleeping
Sleeping
ChaitanyaRasane commited on
Commit ·
838755b
1
Parent(s): beed899
fix: server entry point to main and add main function
Browse files- pyproject.toml +1 -1
- server/app.py +8 -0
pyproject.toml
CHANGED
|
@@ -20,7 +20,7 @@ dependencies = [
|
|
| 20 |
]
|
| 21 |
|
| 22 |
[project.scripts]
|
| 23 |
-
server = "server.app:
|
| 24 |
validate = "openenv_core:validate"
|
| 25 |
|
| 26 |
[project.urls]
|
|
|
|
| 20 |
]
|
| 21 |
|
| 22 |
[project.scripts]
|
| 23 |
+
server = "server.app:main"
|
| 24 |
validate = "openenv_core:validate"
|
| 25 |
|
| 26 |
[project.urls]
|
server/app.py
CHANGED
|
@@ -231,3 +231,11 @@ async def get_leaderboard():
|
|
| 231 |
async def list_agents():
|
| 232 |
"""Return available agent names."""
|
| 233 |
return {"agents": list(AGENTS.keys())}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 231 |
async def list_agents():
|
| 232 |
"""Return available agent names."""
|
| 233 |
return {"agents": list(AGENTS.keys())}
|
| 234 |
+
|
| 235 |
+
def main():
|
| 236 |
+
"""Launch the server for OpenEnv compatibility."""
|
| 237 |
+
import uvicorn
|
| 238 |
+
uvicorn.run(app, host="0.0.0.0", port=7860)
|
| 239 |
+
|
| 240 |
+
if __name__ == "__main__":
|
| 241 |
+
main()
|