Spaces:
Sleeping
Sleeping
Update app.py
Browse files58 unmodified lines5960616263646556 unmodified lines1221231241251261271284 unmodified lines13313413513613713813914014114214358 unmodified lines}prompt_template = """You are a neuromarketing expert AI analyzing an ad creative image critically with emphasis on copy, CTA, best time and platform etc..Evaluate this image strictly on these 5 cognitive parameters. Give a score between 0.20 and 0.98.Also provide a VERY brief 1-sentence analytical reason based exactly on what is visibly in the image.The parameters are:- visual_saliency (How effectively it draws the eye with contrast, colors, shapes)56 unmodified linesexcept Exception as e:scores = {"visual_saliency": 0.32, "cognitive_ease": 0.28,"emotional_arousal": 0.20, "value_recognition": 0.45, "memory_encoding": 0.24}reasons = {k: f"Error: {str(e)[:50]}..." for k in scores}insights = [f"API Error: {str(e)}"]4 unmodified linesh = int(hashlib.md5(seed.encode()).hexdigest(), 16)scores = {"visual_saliency": 0.20 + ((h % 31) / 100),"cognitive_ease": 0.20 + (((h // 2) % 31) / 100),"emotional_arousal": 0.20 + (((h // 5) % 31) / 100),"value_recognition": 0.20 + (((h // 11) % 31) / 100),"memory_encoding": 0.20 + (((h // 7) % 31) / 100),}reasons = {"visual_saliency": "Mock reason based on deterministic simulation.",58 unmodified lines5960616263646556 unmodified lines1221231241251261271284 unmodified lines13313413513613713813914014114214358 unmodified lines}prompt_template = """You are a neuromarketing expert AI analyzing an ad creative image critically with emphasis on copy, CTA, best time and platform etc..Evaluate this image strictly on these 5 cognitive parameters. Give a score between 0.10 and 0.98.Also provide a VERY brief 1-sentence analytical reason based exactly on what is visibly in the image.The parameters are:- visual_saliency (How effectively it draws the eye with contrast, colors, shapes)56 unmodified linesexcept Exception as e:scores = {"visual_saliency": 0.32, "cognitive_ease": 0.28,"emotional_arousal": 0.10, "value_recognition": 0.45, "memory_encoding": 0.24}reasons = {k: f"Error: {str(e)[:50]}..." for k in scores}insights = [f"API Error: {str(e)}"]4 unmodified linesh = int(hashlib.md5(seed.encode()).hexdigest(), 16)scores = {"visual_saliency": 0.10 + ((h % 31) / 100),"cognitive_ease": 0.10 + (((h // 2) % 31) / 100),"emotional_arousal": 0.10 + (((h // 5) % 31) / 100),"value_recognition": 0.10 + (((h // 11) % 31) / 100),"memory_encoding": 0.10 + (((h // 7) % 31) / 100),}reasons = {"visual_saliency": "Mock reason based on deterministic simulation.",
app.py+7-7