From f319c609fd935334b4ca657d5edc68e5bde01207 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Manuel=20G=C3=B3mez?= Date: Mon, 29 Jun 2026 11:01:01 +0200 Subject: [PATCH] Remove basic creative analysis from run.py: use analyze_creatives.py exclusively Co-Authored-By: Claude Sonnet 4.6 --- run.py | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/run.py b/run.py index 38ab8e2..45e5113 100644 --- a/run.py +++ b/run.py @@ -8,7 +8,7 @@ from datetime import datetime import config from meta_ads_client import MetaAdsClient -from agent import decide, analyze_creative, analyze_unit +from agent import decide, analyze_unit from baserow_client import BaserowClient import slack_notifier @@ -354,23 +354,6 @@ def run(): verticals[vertical]["leads"] += metrics["leads"] verticals[vertical]["margin"] += margin - # ── Creative visual analysis (Baserow storage) ───────────────────── - try: - for ad in meta.get_ads_with_creatives(cid): - if not ad["thumbnail_url"]: - continue - result = analyze_creative(ad["thumbnail_url"], ad["ad_name"]) - baserow.save_creative_analysis({ - "ad_id": ad["ad_id"], - "ad_name": ad["ad_name"], - "campaign_id": cid, - "image_url": ad["thumbnail_url"], - "analysis": result.get("analysis", ""), - "score": result.get("score", 0), - "recommendations": result.get("recommendations", ""), - }) - except Exception as e: - errors.append(f"Creatives {metrics['name']}: {e}") # ── Top 10 best and worst ───────────────────────────────────────────────── with_leads = [m for m in metrics_all.values() if m["leads"] > 0]