Spaces:
Sleeping
Sleeping
Download server/app.py from Drac0528/CodeSecure: direct link, hf CLI and curl.
- Browser
- Download file 871 Bytes
-
https://huggingface.co/spaces/Drac0528/CodeSecure/resolve/main/server/app.py
- Command line
-
hf download hf://spaces/Drac0528/CodeSecure/server/app.py
-
curl -L -o app.py https://huggingface.co/spaces/Drac0528/CodeSecure/resolve/main/server/app.py
871 Bytes
| from __future__ import annotations | |
| try: | |
| from core.env_server.http_server import create_app | |
| except ImportError: | |
| try: | |
| from openenv.core.env_server.http_server import create_app | |
| except ImportError: | |
| from openenv_core.env_server.http_server import create_app | |
| try: | |
| from ..models import CodeSecurityAction, CodeSecurityObservation | |
| from .security_environment import CodeSecurityAuditorEnvironment | |
| except ImportError: | |
| from models import CodeSecurityAction, CodeSecurityObservation | |
| from server.security_environment import CodeSecurityAuditorEnvironment | |
| app = create_app( | |
| CodeSecurityAuditorEnvironment, | |
| CodeSecurityAction, | |
| CodeSecurityObservation, | |
| env_name="code_security_auditor_env", | |
| ) | |
| def main() -> None: | |
| import uvicorn | |
| uvicorn.run(app, host="0.0.0.0", port=8000) | |
| if __name__ == "__main__": | |
| main() | |