Spaces:
Runtime error
Runtime error
File size: 548 Bytes
50f83f4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | 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)
|