Spaces:
Runtime error
Runtime error
| import sys | |
| from pathlib import Path | |
| eval_file = Path("app_kit/eval.py") | |
| content = eval_file.read_text() | |
| # Find the build_response call and extract llm_stats | |
| content = content.replace( | |
| 'response_body, _, payload = build_response(', | |
| 'response_body, _, payload = build_response(' | |
| ) | |
| # Actually, I can just inject it right after the loop finishes. | |
| content = content.replace( | |
| 'report = {', | |
| 'report = {\n "model_name": payload.get("llm_stats", {}).get("model_id", "openbmb/MiniCPM-V-4_6-gguf"),' | |
| ) | |
| eval_file.write_text(content) | |