Spaces:
Sleeping
Sleeping
Download adsp/monitoring/evaluation.py from thanhnv2323/humanize-text-python: direct link, hf CLI and curl.
- Browser
- Download file 440 Bytes
-
https://huggingface.co/spaces/thanhnv2323/humanize-text-python/resolve/main/adsp/monitoring/evaluation.py
- Command line
-
hf download hf://spaces/thanhnv2323/humanize-text-python/adsp/monitoring/evaluation.py
-
curl -L -o evaluation.py https://huggingface.co/spaces/thanhnv2323/humanize-text-python/resolve/main/adsp/monitoring/evaluation.py
440 Bytes
| """Evaluation pipelines for persona quality.""" | |
| from __future__ import annotations | |
| from dataclasses import dataclass | |
| from typing import Iterable | |
| class EvaluationSuite: | |
| """Runs rule-based or LLM-as-judge evaluations.""" | |
| checks: Iterable = () | |
| def run(self, response: str) -> dict: | |
| results = {} | |
| for check in self.checks: | |
| results[check.__name__] = check(response) | |
| return results | |