auto-save 2026-05-14 10:14 (~7)
This commit is contained in:
@@ -1037,6 +1037,10 @@ def _score_transparent_human_frame(img_path: Path) -> TransparentHumanFrameScore
|
||||
max_tokens=1200,
|
||||
)
|
||||
raw = (resp.choices[0].message.content or "").strip()
|
||||
if raw.startswith("```"):
|
||||
import re as _re
|
||||
match = _re.search(r"\{[\s\S]*\}", raw)
|
||||
raw = match.group(0) if match else raw
|
||||
data = json.loads(raw)
|
||||
except Exception as e:
|
||||
return TransparentHumanFrameScore(qualified=False, reject_reason=f"AI 评分失败:{e}")
|
||||
|
||||
Reference in New Issue
Block a user