Spaces:
Sleeping
Sleeping
Download scripts/evaluate_real_queries.py from bnewcomer/MediBot: direct link, hf CLI and curl.
- Browser
- Download file 620 Bytes
-
https://huggingface.co/spaces/bnewcomer/MediBot/resolve/main/scripts/evaluate_real_queries.py
- Command line
-
hf download hf://spaces/bnewcomer/MediBot/scripts/evaluate_real_queries.py
-
curl -L -o evaluate_real_queries.py https://huggingface.co/spaces/bnewcomer/MediBot/resolve/main/scripts/evaluate_real_queries.py
620 Bytes
| from pathlib import Path | |
| import sys | |
| ROOT = Path(__file__).resolve().parents[1] | |
| if str(ROOT) not in sys.path: | |
| sys.path.insert(0, str(ROOT)) | |
| from eval.real_query_runner import build_deterministic_app, evaluate_case, format_results, load_cases # noqa: E402 | |
| def main() -> int: | |
| app = build_deterministic_app() | |
| # Return a nonzero exit code so this script can be used in automation. | |
| results = [evaluate_case(app, case) for case in load_cases()] | |
| print(format_results(results)) | |
| return 0 if all(result["passed"] for result in results) else 1 | |
| if __name__ == "__main__": | |
| raise SystemExit(main()) | |