Download src/cli/main.py from amkyawdev/burme-coder-max: direct link, hf CLI and curl.
- Browser
- Download file 2.17 kB
-
https://huggingface.co/datasets/amkyawdev/burme-coder-max/resolve/d9243d8a153e4179fa2bf1c993522c79cd37faaf/src/cli/main.py
- Command line
-
hf download hf://datasets/amkyawdev/burme-coder-max@d9243d8a153e4179fa2bf1c993522c79cd37faaf/src/cli/main.py
-
curl -L -o main.py https://huggingface.co/datasets/amkyawdev/burme-coder-max/resolve/d9243d8a153e4179fa2bf1c993522c79cd37faaf/src/cli/main.py
2.17 kB
| """Main CLI Entry Point""" | |
| import sys | |
| import click | |
| from rich.console import Console | |
| from .commands import run_command, train_command, eval_command | |
| from .interactive import InteractiveMode | |
| console = Console() | |
| def main(): | |
| """🧑💻 Burme-Coder-Max - Myanmar AI Coding Agent""" | |
| pass | |
| def ask(instruction: str, model: str, verbose: bool): | |
| """Ask a coding question in Burmese or English""" | |
| from src.core import CoderAgent | |
| from src.animations import Spinner | |
| from src.ui.thanking import ThankYou | |
| agent = CoderAgent(model=model) | |
| with Spinner("Thinking..."): | |
| response = agent.generate_response(instruction) | |
| console.print(response["response"]) | |
| if verbose: | |
| console.print(f"\n[dim]Session: {response['session_id']}[/dim]") | |
| console.print(f"[dim]Model: {response['model']}[/dim]") | |
| ThankYou.show() | |
| def serve(host: str, port: int): | |
| """Start API server""" | |
| console.print(f"[green]Starting server on {host}:{port}...[/green]") | |
| console.print("[yellow]API server not yet implemented[/yellow]") | |
| def interactive(): | |
| """Start interactive mode""" | |
| mode = InteractiveMode() | |
| mode.start() | |
| def train(data: str, epochs: int): | |
| """Train the agent on trajectories""" | |
| train_command(data, epochs) | |
| def eval(data: str): | |
| """Evaluate agent performance""" | |
| eval_command(data) | |
| # Register subcommands | |
| main.add_command(run_command) | |
| main.add_command(train_command) | |
| main.add_command(eval_command) | |
| if __name__ == "__main__": | |
| main() | |