Spaces:
Sleeping
Sleeping
Download adsp/modeling/train.py from thanhnv2323/humanize-text-python: direct link, hf CLI and curl.
- Browser
- Download file 555 Bytes
-
https://huggingface.co/spaces/thanhnv2323/humanize-text-python/resolve/main/adsp/modeling/train.py
- Command line
-
hf download hf://spaces/thanhnv2323/humanize-text-python/adsp/modeling/train.py
-
curl -L -o train.py https://huggingface.co/spaces/thanhnv2323/humanize-text-python/resolve/main/adsp/modeling/train.py
555 Bytes
| """CLI wrapper around the PersonaTrainer stub.""" | |
| from pathlib import Path | |
| import typer | |
| from adsp.config import MODELS_DIR, PROCESSED_DATA_DIR | |
| from adsp.modeling.training import PersonaTrainer | |
| app = typer.Typer() | |
| def main( | |
| dataset_path: Path = PROCESSED_DATA_DIR / "persona_dataset.parquet", | |
| output_dir: Path = MODELS_DIR, | |
| ): | |
| trainer = PersonaTrainer(dataset_path=dataset_path, output_dir=output_dir) | |
| model_path = trainer.train() | |
| typer.echo(f"Saved adapter to {model_path}") | |
| if __name__ == "__main__": | |
| app() | |