Upload engine/predict_yearly.py with huggingface_hub
Browse files7503 unmodified lines750475057506750775087509751075117503 unmodified linesreturn out_news_v = "; ".join((a.get("title") or "")[:90] for a in (all_data.get("news") or [])[:8])try:all_data["corp_events"] = _corporate_events_brief(ticker, _ovs.get("Name"), _validate_call)if all_data["corp_events"]:print(" [events] " + " | ".join(f"{e['date']}: {e['event'][:60]}" for e in all_data["corp_events"][:3]))except Exception: # noqa: BLE0017503 unmodified lines75047505750675077508750975107511751275137514751575167517751875197520752175227503 unmodified linesreturn out_news_v = "; ".join((a.get("title") or "")[:90] for a in (all_data.get("news") or [])[:8])try:# Event RECALL needs the strongest model first (flash-lite returned an empty# list for Apple's own CEO succession); Claude leads, GPT and Gemini back up.def _events_call(system, user):out = _dpv._call_claude_json(system, user)if not (out or {}).get("events"):out2 = _dpv._call_frontier_json(user, system=system)if (out2 or {}).get("events"):return out2if out is None:out = _dpv._call_gemini_json(system, user)return outall_data["corp_events"] = _corporate_events_brief(ticker, _ovs.get("Name"), _events_call)if all_data["corp_events"]:print(" [events] " + " | ".join(f"{e['date']}: {e['event'][:60]}" for e in all_data["corp_events"][:3]))except Exception: # noqa: BLE001
engine/predict_yearly.py+12-1