Spaces:
Sleeping
Sleeping
Download models.py from vinith17/CodeBug: direct link, hf CLI and curl.
- Browser
- Download file 580 Bytes
-
https://huggingface.co/spaces/vinith17/CodeBug/resolve/d2ce69fd9f9abbe48bbd4aa1ee8d7d1b5ae02197/models.py
- Command line
-
hf download hf://spaces/vinith17/CodeBug@d2ce69fd9f9abbe48bbd4aa1ee8d7d1b5ae02197/models.py
-
curl -L -o models.py https://huggingface.co/spaces/vinith17/CodeBug/resolve/d2ce69fd9f9abbe48bbd4aa1ee8d7d1b5ae02197/models.py
580 Bytes
| from typing import Optional | |
| from openenv.core.env_server import Action, Observation, State | |
| class CodeReviewAction(Action): | |
| category: str # E.g., 'security', 'logic', 'style', 'approve' | |
| severity: int # 1 to 5 (5 is most severe) | |
| line_hint: Optional[int] | |
| comment: str # Short explanation of the bug | |
| class CodeReviewObservation(Observation): | |
| code_snippet: str | |
| difficulty: str # 'easy', 'medium', 'hard' | |
| feedback: str # Message to the agent | |
| class CodeReviewState(State): | |
| current_task_idx: int = 0 | |
| total_score: float = 0.0 | |