Spaces:
Running
Running
Download server/app.py from Boobesh007/code-review: direct link, hf CLI and curl.
- Browser
- Download file 591 Bytes
-
https://huggingface.co/spaces/Boobesh007/code-review/resolve/main/server/app.py
- Command line
-
hf download hf://spaces/Boobesh007/code-review/server/app.py
-
curl -L -o app.py https://huggingface.co/spaces/Boobesh007/code-review/resolve/main/server/app.py
591 Bytes
| import sys | |
| import os | |
| sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) | |
| from openenv.core.env_server.http_server import create_app | |
| from models import CodeReviewAction, CodeReviewObservation | |
| from server.code_review_environment import CodeReviewEnvironment | |
| app = create_app( | |
| CodeReviewEnvironment, | |
| CodeReviewAction, | |
| CodeReviewObservation, | |
| env_name="code_review", | |
| max_concurrent_envs=10, | |
| ) | |
| def main(host: str = "0.0.0.0", port: int = 8000): | |
| import uvicorn | |
| uvicorn.run(app, host=host, port=port) | |
| if __name__ == "__main__": | |
| main() | |