Spaces:
Sleeping
Sleeping
Download adsp/app/report_service.py from thanhnv2323/humanize-text-python: direct link, hf CLI and curl.
- Browser
- Download file 641 Bytes
-
https://huggingface.co/spaces/thanhnv2323/humanize-text-python/resolve/main/adsp/app/report_service.py
- Command line
-
hf download hf://spaces/thanhnv2323/humanize-text-python/adsp/app/report_service.py
-
curl -L -o report_service.py https://huggingface.co/spaces/thanhnv2323/humanize-text-python/resolve/main/adsp/app/report_service.py
641 Bytes
| """Generates structured reports from processed persona insights.""" | |
| from __future__ import annotations | |
| from dataclasses import dataclass | |
| from pathlib import Path | |
| class ReportService: | |
| """Coordinates pulling insights and writing them to human-friendly formats.""" | |
| output_dir: Path | |
| def generate(self, persona_id: str, insights: dict) -> Path: | |
| """Persist the supplied insights in a markdown stub for stakeholders.""" | |
| report_path = self.output_dir / f"{persona_id}_report.md" | |
| report_path.write_text(f"# Insights for {persona_id}\n\n{insights}\n", encoding="utf-8") | |
| return report_path | |