Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -30,179 +30,262 @@ def extract_month_from_period(period_text):
|
|
30 |
return None
|
31 |
|
32 |
def analyze_concepts(month):
|
33 |
-
"""
|
34 |
|
35 |
-
# 월별 상세 데이터 (
|
36 |
monthly_data = {
|
37 |
"1월": {
|
38 |
-
"holidays": ["신정", "설날"
|
39 |
-
"special_days": ["
|
40 |
-
"seasonal_terms": ["소한", "대한", "입춘"],
|
41 |
-
"trends": ["새해 다짐", "다이어트", "정리정돈", "미니멀라이프", "헬스케어"],
|
42 |
-
"seasons": ["겨울", "신년", "
|
43 |
"colors": ["#FF6B6B", "#4ECDC4", "#45B7D1"],
|
44 |
-
"mood": "희망적이고 새로운 시작"
|
|
|
45 |
},
|
46 |
"2월": {
|
47 |
-
"holidays": ["밸런타인데이"
|
48 |
-
"special_days": ["
|
49 |
"seasonal_terms": ["입춘", "우수"],
|
50 |
-
"trends": ["
|
51 |
-
"seasons": ["겨울 끝", "
|
52 |
"colors": ["#FF69B4", "#FFB6C1", "#DC143C"],
|
53 |
-
"mood": "로맨틱하고 감성적"
|
|
|
54 |
},
|
55 |
"3월": {
|
56 |
"holidays": ["삼일절", "화이트데이"],
|
57 |
-
"special_days": ["여성의 날", "봄의 시작", "
|
58 |
"seasonal_terms": ["경칩", "춘분"],
|
59 |
-
"trends": ["봄맞이", "
|
60 |
"seasons": ["봄", "벚꽃", "새싹"],
|
61 |
"colors": ["#FFB6C1", "#98FB98", "#87CEEB"],
|
62 |
-
"mood": "설렘가득하고 활기찬"
|
|
|
63 |
},
|
64 |
"4월": {
|
65 |
-
"holidays": ["만우절"
|
66 |
-
"special_days": ["
|
67 |
"seasonal_terms": ["청명", "곡우"],
|
68 |
-
"trends": ["벚꽃축제", "봄피크닉", "아웃도어", "꽃놀이", "
|
69 |
"seasons": ["봄 절정", "꽃구경", "나들이"],
|
70 |
"colors": ["#98FB98", "#F0E68C", "#DDA0DD"],
|
71 |
-
"mood": "생기발랄하고 즐거운"
|
|
|
72 |
},
|
73 |
"5월": {
|
74 |
-
"holidays": ["
|
75 |
-
"special_days": ["
|
76 |
"seasonal_terms": ["입하", "소만"],
|
77 |
-
"trends": ["
|
78 |
"seasons": ["신록", "야외활동", "따뜻함"],
|
79 |
"colors": ["#32CD32", "#FFB6C1", "#87CEEB"],
|
80 |
-
"mood": "따뜻하고
|
|
|
81 |
},
|
82 |
"6월": {
|
83 |
-
"holidays": ["현충일"
|
84 |
-
"special_days": ["키스데이", "
|
85 |
"seasonal_terms": ["망종", "하지"],
|
86 |
-
"trends": ["여름준비", "다이어트", "
|
87 |
-
"seasons": ["초여름", "
|
88 |
"colors": ["#00CED1", "#FFD700", "#FF6347"],
|
89 |
-
"mood": "시원하고 활동적인"
|
|
|
90 |
},
|
91 |
"7월": {
|
92 |
"holidays": ["제헌절"],
|
93 |
-
"special_days": ["실버데이", "
|
94 |
-
"seasonal_terms": ["소서", "대서", "초복", "중복"],
|
95 |
-
"trends": ["여름휴가", "
|
96 |
-
"seasons": ["여름", "
|
97 |
"colors": ["#00BFFF", "#FFD700", "#FF6347"],
|
98 |
-
"mood": "역동적이고
|
|
|
99 |
},
|
100 |
"8월": {
|
101 |
"holidays": ["광복절"],
|
102 |
-
"special_days": ["그린데이", "
|
103 |
-
"seasonal_terms": ["입추", "처서", "말복"],
|
104 |
-
"trends": ["
|
105 |
-
"seasons": ["한여름", "
|
106 |
"colors": ["#00BFFF", "#FF6347", "#FFD700"],
|
107 |
-
"mood": "열정적이고 추억가득한"
|
|
|
108 |
},
|
109 |
"9월": {
|
110 |
"holidays": ["추석"],
|
111 |
-
"special_days": ["포토데이", "뮤직데이", "
|
112 |
"seasonal_terms": ["백로", "추분"],
|
113 |
-
"trends": ["
|
114 |
-
"seasons": ["가을", "
|
115 |
"colors": ["#FF8C00", "#DC143C", "#B8860B"],
|
116 |
-
"mood": "
|
|
|
117 |
},
|
118 |
"10월": {
|
119 |
-
"holidays": ["
|
120 |
"special_days": ["와인데이", "커피데이", "독서의 달"],
|
121 |
"seasonal_terms": ["한로", "상강"],
|
122 |
-
"trends": ["가을단풍", "독서", "카페문화", "
|
123 |
-
"seasons": ["단풍", "가을정취", "
|
124 |
"colors": ["#FF8C00", "#DC143C", "#B8860B"],
|
125 |
-
"mood": "감성적이고
|
|
|
126 |
},
|
127 |
"11월": {
|
128 |
-
"holidays": ["빼빼로데이"
|
129 |
-
"special_days": ["무비데이", "오렌지데이", "
|
130 |
"seasonal_terms": ["입동", "소설"],
|
131 |
-
"trends": ["빼빼로데이", "
|
132 |
-
"seasons": ["늦가을", "
|
133 |
"colors": ["#8B4513", "#A0522D", "#CD853F"],
|
134 |
-
"mood": "포근하고 준비하는"
|
|
|
135 |
},
|
136 |
"12월": {
|
137 |
-
"holidays": ["크리스마스"
|
138 |
-
"special_days": ["허그데이", "
|
139 |
-
"seasonal_terms": ["대설", "동지"
|
140 |
-
"trends": ["크리스마스", "연말파티", "선물", "
|
141 |
-
"seasons": ["겨울", "연말", "
|
142 |
"colors": ["#DC143C", "#228B22", "#FFD700"],
|
143 |
-
"mood": "축제같고
|
|
|
144 |
}
|
145 |
}
|
146 |
|
147 |
data = monthly_data.get(month, {})
|
148 |
|
149 |
-
#
|
150 |
concepts = []
|
151 |
|
152 |
-
# 컨셉 1:
|
153 |
-
if data.get("
|
154 |
-
|
155 |
concepts.append({
|
156 |
-
"name": f"{
|
157 |
-
"theme": f"{
|
158 |
-
"score": 8.
|
159 |
-
"reason": f"{
|
160 |
-
"target": "20-40대 여성,
|
161 |
"colors": data.get("colors", ["#FF69B4"]),
|
162 |
-
"keywords": [
|
163 |
-
"participation_factor": "
|
164 |
-
|
165 |
-
|
166 |
-
# 컨셉 2: 절기 기반 (새로 추가)
|
167 |
-
if data.get("seasonal_terms"):
|
168 |
-
main_term = data["seasonal_terms"][0]
|
169 |
-
concepts.append({
|
170 |
-
"name": f"{main_term} 절기 이벤트",
|
171 |
-
"theme": f"24절기 {main_term}의 의미를 담은 전통 감성 이벤트",
|
172 |
-
"score": 7.3,
|
173 |
-
"reason": f"전통 절기 {main_term}로 한국적 정서와 계절감 어필",
|
174 |
-
"target": "전연령대, 전통문화 관심층, 자연친화적 성향",
|
175 |
-
"colors": data.get("colors", ["#8FBC8F"]),
|
176 |
-
"keywords": data.get("seasonal_terms", [])[:2] + ["전통", "자연"],
|
177 |
-
"participation_factor": "전통적 가치, 자연 친화성"
|
178 |
})
|
179 |
|
180 |
-
# 컨셉
|
181 |
if data.get("trends"):
|
182 |
-
|
183 |
concepts.append({
|
184 |
-
"name": f"{
|
185 |
-
"theme": f"
|
186 |
-
"score": 8.
|
187 |
-
"reason": f"현재
|
188 |
-
"target": "20-30대 트렌드 민감층, SNS
|
189 |
"colors": data.get("colors", ["#4ECDC4"]),
|
190 |
"keywords": data.get("trends", [])[:3],
|
191 |
-
"participation_factor": "트렌드 화제성, SNS 확산성"
|
|
|
192 |
})
|
193 |
|
194 |
-
# 컨셉
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
195 |
if data.get("seasons"):
|
196 |
season = data["seasons"][0]
|
197 |
concepts.append({
|
198 |
-
"name": f"{season} 라이프
|
199 |
-
"theme": f"{season}
|
200 |
-
"score":
|
201 |
-
"reason": f"{season}
|
202 |
-
"target": "
|
203 |
"colors": data.get("colors", ["#98FB98"]),
|
204 |
-
"keywords": data.get("seasons", []) + data.get("
|
205 |
-
"participation_factor": "계절
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
206 |
})
|
207 |
|
208 |
# 컨셉 5: 스페셜 데이 기��
|
@@ -258,8 +341,88 @@ def analyze_concepts(month):
|
|
258 |
|
259 |
return result, concept_names
|
260 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
261 |
def generate_notice(concept, event_type, event_period, prize_benefits):
|
262 |
-
"""
|
263 |
|
264 |
if not concept:
|
265 |
return "먼저 컨셉을 선택해주세요."
|
@@ -273,6 +436,14 @@ def generate_notice(concept, event_type, event_period, prize_benefits):
|
|
273 |
else:
|
274 |
period_text = event_period
|
275 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
276 |
# 당첨 혜택이 입력되지 않았으면 기본값 사용
|
277 |
if not prize_benefits or prize_benefits.strip() == "":
|
278 |
default_benefits = """✨ 1등 (1명): 스타벅스 5만원 기프트카드
|
@@ -283,16 +454,28 @@ def generate_notice(concept, event_type, event_period, prize_benefits):
|
|
283 |
else:
|
284 |
benefits_text = prize_benefits
|
285 |
|
286 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
287 |
|
288 |
🎉 {concept} 🎉
|
289 |
|
290 |
📅 이벤트 기간: {period_text} 23:59
|
291 |
|
|
|
|
|
292 |
========================
|
293 |
✨ EVENT
|
294 |
특별한 {concept}을 준비했어요!
|
295 |
많은 분들의 적극적인 참여를 기다리고 있습니다 💕
|
|
|
|
|
|
|
296 |
========================
|
297 |
|
298 |
🎯 참여 방법
|
@@ -322,6 +505,8 @@ def generate_notice(concept, event_type, event_period, prize_benefits):
|
|
322 |
📞 문의: 1234-5678
|
323 |
💬 카카오톡: @event_community
|
324 |
|
|
|
|
|
325 |
💝 많은 참여 부탁드려요! 감사합니다 💕"""
|
326 |
|
327 |
return notice
|
|
|
30 |
return None
|
31 |
|
32 |
def analyze_concepts(month):
|
33 |
+
"""20-40대 여성 맞춤 월별 컨셉 분석"""
|
34 |
|
35 |
+
# 월별 상세 데이터 (20-40대 여성 타겟 특화)
|
36 |
monthly_data = {
|
37 |
"1월": {
|
38 |
+
"holidays": ["신정", "설날"],
|
39 |
+
"special_days": ["다이어트 시작", "새해 다짐", "리셋 라이프"],
|
40 |
+
"seasonal_terms": ["소한", "대한", "입춘"],
|
41 |
+
"trends": ["새해 다짐", "다이어트", "정리정돈", "미니멀라이프", "헬스케어", "자기계발"],
|
42 |
+
"seasons": ["겨울", "신년", "새로운 시작"],
|
43 |
"colors": ["#FF6B6B", "#4ECDC4", "#45B7D1"],
|
44 |
+
"mood": "희망적이고 새로운 시작",
|
45 |
+
"female_appeal": ["새해 다짐", "다이어트", "셀프케어", "라이프스타일 리셋"]
|
46 |
},
|
47 |
"2월": {
|
48 |
+
"holidays": ["밸런타인데이"],
|
49 |
+
"special_days": ["갈렌타인데이", "셀프러브", "사랑의 달"],
|
50 |
"seasonal_terms": ["입춘", "우수"],
|
51 |
+
"trends": ["셀프러브", "갈렌타인", "로맨스", "따뜻한 감성", "핑크 무드"],
|
52 |
+
"seasons": ["겨울 끝", "봄 준비", "로맨틱"],
|
53 |
"colors": ["#FF69B4", "#FFB6C1", "#DC143C"],
|
54 |
+
"mood": "로맨틱하고 감성적",
|
55 |
+
"female_appeal": ["셀프러브", "우정", "로맨스", "감성"]
|
56 |
},
|
57 |
"3월": {
|
58 |
"holidays": ["삼일절", "화이트데이"],
|
59 |
+
"special_days": ["여성의 날", "봄의 시작", "새학기"],
|
60 |
"seasonal_terms": ["경칩", "춘분"],
|
61 |
+
"trends": ["봄맞이", "벚꽃 시즌", "봄 패션", "새출발", "꽃구경"],
|
62 |
"seasons": ["봄", "벚꽃", "새싹"],
|
63 |
"colors": ["#FFB6C1", "#98FB98", "#87CEEB"],
|
64 |
+
"mood": "설렘가득하고 활기찬",
|
65 |
+
"female_appeal": ["봄 패션", "꽃구경", "새출발", "여성의 날"]
|
66 |
},
|
67 |
"4월": {
|
68 |
+
"holidays": ["만우절"],
|
69 |
+
"special_days": ["벚꽃 시즌", "봄나들이", "피크닉"],
|
70 |
"seasonal_terms": ["청명", "곡우"],
|
71 |
+
"trends": ["벚꽃축제", "봄피크닉", "아웃도어", "꽃놀이", "봄여행"],
|
72 |
"seasons": ["봄 절정", "꽃구경", "나들이"],
|
73 |
"colors": ["#98FB98", "#F0E68C", "#DDA0DD"],
|
74 |
+
"mood": "생기발랄하고 즐거운",
|
75 |
+
"female_appeal": ["벚꽃놀이", "피크닉", "봄여행", "감성사진"]
|
76 |
},
|
77 |
"5월": {
|
78 |
+
"holidays": ["근로자의날"],
|
79 |
+
"special_days": ["로즈데이", "가정의 달", "감사의 달"],
|
80 |
"seasonal_terms": ["입하", "소만"],
|
81 |
+
"trends": ["감사", "나들이", "로즈데이", "봄여행", "힐링"],
|
82 |
"seasons": ["신록", "야외활동", "따뜻함"],
|
83 |
"colors": ["#32CD32", "#FFB6C1", "#87CEEB"],
|
84 |
+
"mood": "따뜻하고 감사한",
|
85 |
+
"female_appeal": ["로즈데이", "감사표현", "힐링", "나들이"]
|
86 |
},
|
87 |
"6월": {
|
88 |
+
"holidays": ["현충일"],
|
89 |
+
"special_days": ["키스데이", "여름 준비", "다이어트"],
|
90 |
"seasonal_terms": ["망종", "하지"],
|
91 |
+
"trends": ["여름준비", "다이어트", "쿨링", "바캉스준비", "여름패션"],
|
92 |
+
"seasons": ["초여름", "더위", "여름준비"],
|
93 |
"colors": ["#00CED1", "#FFD700", "#FF6347"],
|
94 |
+
"mood": "시원하고 활동적인",
|
95 |
+
"female_appeal": ["여름 다이어트", "쿨링케어", "바캉스", "여름패션"]
|
96 |
},
|
97 |
"7월": {
|
98 |
"holidays": ["제헌절"],
|
99 |
+
"special_days": ["실버데이", "여름휴가", "바캉스"],
|
100 |
+
"seasonal_terms": ["소서", "대서", "초복", "중복"],
|
101 |
+
"trends": ["여름휴가", "바캉스", "휴가패션", "여행", "힐링"],
|
102 |
+
"seasons": ["여름", "휴가", "바캉스"],
|
103 |
"colors": ["#00BFFF", "#FFD700", "#FF6347"],
|
104 |
+
"mood": "역동적이고 자유로운",
|
105 |
+
"female_appeal": ["바캉스", "여행", "휴가패션", "힐링"]
|
106 |
},
|
107 |
"8월": {
|
108 |
"holidays": ["광복절"],
|
109 |
+
"special_days": ["그린데이", "여름 마무리", "휴가"],
|
110 |
+
"seasonal_terms": ["입추", "처서", "말복"],
|
111 |
+
"trends": ["여름휴가", "바다여행", "축제", "여름추억", "힐링"],
|
112 |
+
"seasons": ["한여름", "휴가절정", "추억"],
|
113 |
"colors": ["#00BFFF", "#FF6347", "#FFD700"],
|
114 |
+
"mood": "열정적이고 추억가득한",
|
115 |
+
"female_appeal": ["여름추억", "힐링", "여행", "감성사진"]
|
116 |
},
|
117 |
"9월": {
|
118 |
"holidays": ["추석"],
|
119 |
+
"special_days": ["포토데이", "뮤직데이", "가을시작"],
|
120 |
"seasonal_terms": ["백로", "추분"],
|
121 |
+
"trends": ["가을패션", "독서", "문화생활", "감성", "카페"],
|
122 |
+
"seasons": ["가을", "선선함", "감성"],
|
123 |
"colors": ["#FF8C00", "#DC143C", "#B8860B"],
|
124 |
+
"mood": "감성적이고 성숙한",
|
125 |
+
"female_appeal": ["가을패션", "카페", "독서", "감성사진"]
|
126 |
},
|
127 |
"10월": {
|
128 |
+
"holidays": ["한글날"],
|
129 |
"special_days": ["와인데이", "커피데이", "독서의 달"],
|
130 |
"seasonal_terms": ["한로", "상강"],
|
131 |
+
"trends": ["가을단풍", "독서", "카페문화", "와인", "감성"],
|
132 |
+
"seasons": ["단풍", "가을정취", "감성"],
|
133 |
"colors": ["#FF8C00", "#DC143C", "#B8860B"],
|
134 |
+
"mood": "감성적이고 여유로운",
|
135 |
+
"female_appeal": ["단풍구경", "카페", "와인", "독서"]
|
136 |
},
|
137 |
"11월": {
|
138 |
+
"holidays": ["빼빼로데이"],
|
139 |
+
"special_days": ["무비데이", "오렌지데이", "연말준비"],
|
140 |
"seasonal_terms": ["입동", "소설"],
|
141 |
+
"trends": ["빼빼로데이", "연말준비", "겨울패션", "따뜻함", "코지"],
|
142 |
+
"seasons": ["늦가을", "겨울준비", "포근함"],
|
143 |
"colors": ["#8B4513", "#A0522D", "#CD853F"],
|
144 |
+
"mood": "포근하고 준비하는",
|
145 |
+
"female_appeal": ["빼빼로데이", "겨울패션", "연말모임", "코지라이프"]
|
146 |
},
|
147 |
"12월": {
|
148 |
+
"holidays": ["크리스마스"],
|
149 |
+
"special_days": ["허그데이", "연말파티", "송년"],
|
150 |
+
"seasonal_terms": ["대설", "동지"],
|
151 |
+
"trends": ["크리스마스", "연말파티", "선물", "송년회", "겨울감성"],
|
152 |
+
"seasons": ["겨울", "연말", "크리스마스"],
|
153 |
"colors": ["#DC143C", "#228B22", "#FFD700"],
|
154 |
+
"mood": "축제같고 따뜻한",
|
155 |
+
"female_appeal": ["크리스마스", "연말모임", "선물", "겨울감성"]
|
156 |
}
|
157 |
}
|
158 |
|
159 |
data = monthly_data.get(month, {})
|
160 |
|
161 |
+
# 20-40대 여성 맞춤 컨셉 생성 (6가지)
|
162 |
concepts = []
|
163 |
|
164 |
+
# 컨셉 1: 여성 타겟 기념일/특별한 날 기반
|
165 |
+
if data.get("special_days"):
|
166 |
+
special = data["special_days"][0]
|
167 |
concepts.append({
|
168 |
+
"name": f"{special} 스페셜 이벤트",
|
169 |
+
"theme": f"{special}를 테마로 한 20-40대 여성 맞춤 이벤트",
|
170 |
+
"score": 8.8,
|
171 |
+
"reason": f"20-40대 여성이 공감할 수 있는 {special} 테마로 높은 참여도 예상",
|
172 |
+
"target": "20-40대 여성, 라이프스타일 관심층",
|
173 |
"colors": data.get("colors", ["#FF69B4"]),
|
174 |
+
"keywords": [special] + data.get("female_appeal", [])[:2],
|
175 |
+
"participation_factor": "여성 라이프스타일 공감대, 특별함",
|
176 |
+
"is_recommended": True
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
177 |
})
|
178 |
|
179 |
+
# 컨셉 2: 트렌드 기반 (여성 친화적)
|
180 |
if data.get("trends"):
|
181 |
+
trend = data["trends"][0]
|
182 |
concepts.append({
|
183 |
+
"name": f"{trend} 챌린지",
|
184 |
+
"theme": f"20-40대 여성 트렌드 {trend} 참여형 이벤트",
|
185 |
+
"score": 8.5,
|
186 |
+
"reason": f"현재 여성층에게 인기 있는 {trend} 트렌드로 높은 관심도",
|
187 |
+
"target": "20-30대 트렌드 민감층, SNS 활용 여성",
|
188 |
"colors": data.get("colors", ["#4ECDC4"]),
|
189 |
"keywords": data.get("trends", [])[:3],
|
190 |
+
"participation_factor": "트렌드 화제성, SNS 확산성",
|
191 |
+
"is_recommended": False
|
192 |
})
|
193 |
|
194 |
+
# 컨셉 3: 절기 기반 (현대적 해석)
|
195 |
+
if data.get("seasonal_terms"):
|
196 |
+
term = data["seasonal_terms"][0]
|
197 |
+
concepts.append({
|
198 |
+
"name": f"{term} 모던 라이프",
|
199 |
+
"theme": f"절기 {term}을 현대적으로 해석한 라이프스타일 이벤트",
|
200 |
+
"score": 7.5,
|
201 |
+
"reason": f"전통 절기를 현대 여성 라이프스타일로 재해석한 참신함",
|
202 |
+
"target": "전연령 여성, 감성적 라이프스타일 추구층",
|
203 |
+
"colors": data.get("colors", ["#8FBC8F"]),
|
204 |
+
"keywords": data.get("seasonal_terms", [])[:2] + ["모던", "라이프스타일"],
|
205 |
+
"participation_factor": "전통의 현대적 재해석, 감성적 어필",
|
206 |
+
"is_recommended": False
|
207 |
+
})
|
208 |
+
|
209 |
+
# 컨셉 4: 계절감 + 여성 어필 기반
|
210 |
if data.get("seasons"):
|
211 |
season = data["seasons"][0]
|
212 |
concepts.append({
|
213 |
+
"name": f"{season} 감성 라이프",
|
214 |
+
"theme": f"{season} 계절을 만끽하는 여성 라이프스타일 이벤트",
|
215 |
+
"score": 8.0,
|
216 |
+
"reason": f"{season} 계절감과 여성 감성을 결합한 자연스러운 참여 유도",
|
217 |
+
"target": "20-40대 감성 중시 여성, 계절감 추구층",
|
218 |
"colors": data.get("colors", ["#98FB98"]),
|
219 |
+
"keywords": data.get("seasons", []) + data.get("female_appeal", [])[:2],
|
220 |
+
"participation_factor": "계절 감성, 여성 라이프스타일 공감대",
|
221 |
+
"is_recommended": True
|
222 |
+
})
|
223 |
+
|
224 |
+
# 컨셉 5: 셀프케어/힐링 기반
|
225 |
+
concepts.append({
|
226 |
+
"name": f"{month} 셀프케어 위크",
|
227 |
+
"theme": "나를 위한 특별한 시간, 셀프케어 라이프스타일 이벤트",
|
228 |
+
"score": 8.3,
|
229 |
+
"reason": "20-40대 여성의 핵심 관심사인 셀프케어로 강한 어필",
|
230 |
+
"target": "20-40대 여성, 셀프케어 관심층",
|
231 |
+
"colors": data.get("colors", ["#FFB6C1"]),
|
232 |
+
"keywords": ["셀프케어", "힐링", "나를 위한 시간", "웰빙"],
|
233 |
+
"participation_factor": "자기관리 욕구, 힐링 니즈",
|
234 |
+
"is_recommended": True
|
235 |
+
})
|
236 |
+
|
237 |
+
# 컨셉 6: 커뮤니티 소통 (여성 친화적)
|
238 |
+
concepts.append({
|
239 |
+
"name": f"{month} 언니들의 수다",
|
240 |
+
"theme": "20-40대 여성들의 진솔한 소통과 공감 이벤트",
|
241 |
+
"score": 7.8,
|
242 |
+
"reason": "여성 커뮤니티 특성을 살린 친밀한 소통으로 참여 유도",
|
243 |
+
"target": "기존 여성 회원, 커뮤니티 소통 선호층",
|
244 |
+
"colors": data.get("colors", ["#87CEEB"]),
|
245 |
+
"keywords": ["소통", "공감", "언니들", "진솔함"],
|
246 |
+
"participation_factor": "여성 커뮤니티 소속감, 친밀감",
|
247 |
+
"is_recommended": False
|
248 |
+
})
|
249 |
+
|
250 |
+
# 점수순 정렬 및 추천 컨셉 우선
|
251 |
+
concepts.sort(key=lambda x: (x.get("is_recommended", False), x["score"]), reverse=True)
|
252 |
+
|
253 |
+
# 추천 컨셉 찾기
|
254 |
+
recommended_concept = next((c for c in concepts if c.get("is_recommended", False)), concepts[0])
|
255 |
+
|
256 |
+
# 결과 텍스트 생성
|
257 |
+
result = f"# 🎯 {month} 20-40대 여성 맞춤 컨셉 분석\n\n"
|
258 |
+
result += f"## 🏆 이달의 추천 컨셉: {recommended_concept['name']}\n"
|
259 |
+
result += f"**⭐ 추천 이유:** {recommended_concept['reason']}\n"
|
260 |
+
result += f"**📊 예상 참여도:** {recommended_concept['score']}/10점\n\n"
|
261 |
+
result += "---\n\n"
|
262 |
+
|
263 |
+
result += f"**📊 분석 기준:** {data.get('mood', '특별한')} 분위기\n"
|
264 |
+
result += f"**🎨 주요 색상:** {', '.join(data.get('colors', ['기본색상'])[:3])}\n"
|
265 |
+
result += f"**🔥 여성 어필 트렌드:** {', '.join(data.get('female_appeal', ['기본트렌드'])[:3])}\n"
|
266 |
+
result += f"**🌿 해당 절기:** {', '.join(data.get('seasonal_terms', ['해당없음']))}\n\n"
|
267 |
+
|
268 |
+
concept_names = []
|
269 |
+
|
270 |
+
for i, concept in enumerate(concepts, 1):
|
271 |
+
is_recommended_mark = " 🏆 **추천**" if concept.get("is_recommended", False) else ""
|
272 |
+
result += f"## {i}. {concept['name']}{is_recommended_mark}\n"
|
273 |
+
result += f"**🏷️ 테마:** {concept['theme']}\n"
|
274 |
+
result += f"**⭐ 참여도 점수:** {concept['score']}/10점\n"
|
275 |
+
result += f"**💡 선정 이유:** {concept['reason']}\n"
|
276 |
+
result += f"**🎯 주요 타겟:** {concept['target']}\n"
|
277 |
+
result += f"**🔑 핵심 키워드:** {', '.join(concept['keywords'])}\n"
|
278 |
+
result += f"**📈 참여 요인:** {concept['participation_factor']}\n"
|
279 |
+
result += f"**🎨 추천 색상:** {', '.join(concept['colors'])}\n\n"
|
280 |
+
result += "---\n\n"
|
281 |
+
|
282 |
+
concept_names.append(concept['name'])
|
283 |
+
|
284 |
+
result += f"**💬 총평:** {month}은 {data.get('mood', '특별한')} 특성을 가진 달로, "
|
285 |
+
result += f"특히 20-40대 여성에게는 '{data.get('female_appeal', ['특별한'])[0]}' 관련 이벤트가 "
|
286 |
+
result += f"높은 참여도를 보일 것으로 예상됩니다."
|
287 |
+
|
288 |
+
return result, concept_names "계절 공감대, 일상 연관성"
|
289 |
})
|
290 |
|
291 |
# 컨셉 5: 스페셜 데이 기��
|
|
|
341 |
|
342 |
return result, concept_names
|
343 |
|
344 |
+
def generate_trendy_copy(concept_name, month, event_period):
|
345 |
+
"""트렌디한 카피라이팅 생성"""
|
346 |
+
|
347 |
+
# 월별 트렌디한 키워드와 분위기
|
348 |
+
monthly_vibes = {
|
349 |
+
"1월": {"vibe": "새로운 시작", "keywords": ["리셋", "다짐", "새해"], "hashtags": ["#새해새출발", "#다이어트시작", "#셀프케어"]},
|
350 |
+
"2월": {"vibe": "로맨틱", "keywords": ["사랑", "감성", "따뜻함"], "hashtags": ["#셀프러브", "#갈렌타인", "#감성충전"]},
|
351 |
+
"3월": {"vibe": "설렘", "keywords": ["봄", "새출발", "꽃"], "hashtags": ["#봄맞이", "#새시작", "#벚꽃시즌"]},
|
352 |
+
"4월": {"vibe": "생기발랄", "keywords": ["꽃", "나들이", "피크닉"], "hashtags": ["#벚꽃놀이", "#봄나들이", "#감성사진"]},
|
353 |
+
"5월": {"vibe": "감사", "keywords": ["힐링", "감사", "여유"], "hashtags": ["#힐링타임", "#감사한일상", "#나를위한시간"]},
|
354 |
+
"6월": {"vibe": "시원함", "keywords": ["여름", "쿨링", "다이어트"], "hashtags": ["#여름준비", "#쿨링케어", "#바디프로필"]},
|
355 |
+
"7월": {"vibe": "자유로움", "keywords": ["바캉스", "휴가", "힐링"], "hashtags": ["#바캉스룩", "#여행스타그램", "#힐링여행"]},
|
356 |
+
"8월": {"vibe": "열정", "keywords": ["추억", "여행", "자유"], "hashtags": ["#여름추억", "#휴가끝", "#감성여행"]},
|
357 |
+
"9월": {"vibe": "감성", "keywords": ["가을", "감성", "카페"], "hashtags": ["#가을감성", "#카페투어", "#독서모드"]},
|
358 |
+
"10월": {"vibe": "여유", "keywords": ["단풍", "카페", "감성"], "hashtags": ["#가을단풍", "#감성카페", "#독서의계절"]},
|
359 |
+
"11월": {"vibe": "포근함", "keywords": ["따뜻함", "코지", "준비"], "hashtags": ["#코지라이프", "#겨울준비", "#따뜻한일상"]},
|
360 |
+
"12월": {"vibe": "축제", "keywords": ["크리스마스", "연말", "마무리"], "hashtags": ["#크리스마스무드", "#연말정산", "#따뜻한겨울"]}
|
361 |
+
}
|
362 |
+
|
363 |
+
month_key = month.replace('월', '월')
|
364 |
+
vibe_data = monthly_vibes.get(month_key, {"vibe": "특별한", "keywords": ["이벤트"], "hashtags": ["#특별한순간"]})
|
365 |
+
|
366 |
+
# 언어유희와 트렌드를 반영한 카피 생성
|
367 |
+
copies = {
|
368 |
+
"다이어트 시작": {
|
369 |
+
"sub1": "🌟 새해, 새로운 나를 만나는 시간",
|
370 |
+
"main": "다이어트는 '다이'아몬드처럼 빛나는 '어트'랙티브한 나!",
|
371 |
+
"sub2": "올해는 정말 다를거야 💪✨",
|
372 |
+
"hashtags": ["#다이어트시작", "#새해새몸", "#건강한변화", "#셀프케어"]
|
373 |
+
},
|
374 |
+
"셀프러브": {
|
375 |
+
"sub1": "💕 나를 사랑하는 가장 완벽한 방법",
|
376 |
+
"main": "Self-Love는 셀프 러브가 아니라 '설프 러브'야!",
|
377 |
+
"sub2": "오늘부터 나에게 더 다정하게 💖",
|
378 |
+
"hashtags": ["#셀프러브", "#나를위한시간", "#자기사랑", "#갈렌타인"]
|
379 |
+
},
|
380 |
+
"봄맞이": {
|
381 |
+
"sub1": "🌸 봄이 오면 마음도 설레는 이유",
|
382 |
+
"main": "봄맞이? 봄 '맞다'이! 이 계절이 딱 맞아떨어져",
|
383 |
+
"sub2": "새로운 시작이 기다리고 있어요 🌱",
|
384 |
+
"hashtags": ["#봄맞이", "#새시작", "#벚꽃시즌", "#설렘충전"]
|
385 |
+
},
|
386 |
+
"바캉스": {
|
387 |
+
"sub1": "🏖️ 올여름 가장 핫한 힐링 플랜",
|
388 |
+
"main": "바캉스는 '바'로 '캉'스럽게 쉬는 거야!",
|
389 |
+
"sub2": "휴가 = 휴식 + 가치있는 시간 ☀️",
|
390 |
+
"hashtags": ["#바캉스", "#여행스타그램", "#힐링여행", "#휴가룩"]
|
391 |
+
},
|
392 |
+
"가을감성": {
|
393 |
+
"sub1": "🍂 가을이 선사하는 특별한 감성",
|
394 |
+
"main": "가을엔 '가'슴이 '을'마나 따뜻해지는지",
|
395 |
+
"sub2": "이 계절만의 포근함을 만끽해요 🧡",
|
396 |
+
"hashtags": ["#가을감성", "#감성카페", "#단풍구경", "#코지라이프"]
|
397 |
+
},
|
398 |
+
"크리스마스": {
|
399 |
+
"sub1": "🎄 한 해의 마지막을 빛내는 특별함",
|
400 |
+
"main": "Merry Christmas? 메리하게 크리스마스!",
|
401 |
+
"sub2": "소중한 사람들과 따뜻한 연말 보내요 ❄️",
|
402 |
+
"hashtags": ["#크리스마스무드", "#따뜻한겨울", "#연말감성", "#소중한순간"]
|
403 |
+
}
|
404 |
+
}
|
405 |
+
|
406 |
+
# 컨셉명에서 키워드 추출하여 적절한 카피 선택
|
407 |
+
selected_copy = None
|
408 |
+
for keyword, copy_data in copies.items():
|
409 |
+
if any(k in concept_name for k in keyword.split()):
|
410 |
+
selected_copy = copy_data
|
411 |
+
break
|
412 |
+
|
413 |
+
# 기본 카피 (매칭되는 것이 없을 때)
|
414 |
+
if not selected_copy:
|
415 |
+
selected_copy = {
|
416 |
+
"sub1": f"✨ {vibe_data['vibe']}한 순간을 위한 특별 초대",
|
417 |
+
"main": f"{concept_name}로 만드는 나만의 스토리",
|
418 |
+
"sub2": f"{vibe_data['keywords'][0]}의 계절, 함께 만들어가요 💫",
|
419 |
+
"hashtags": vibe_data['hashtags']
|
420 |
+
}
|
421 |
+
|
422 |
+
return selected_copy
|
423 |
+
|
424 |
def generate_notice(concept, event_type, event_period, prize_benefits):
|
425 |
+
"""트렌디한 카피라이팅이 포함된 공지사항 생성"""
|
426 |
|
427 |
if not concept:
|
428 |
return "먼저 컨셉을 선택해주세요."
|
|
|
436 |
else:
|
437 |
period_text = event_period
|
438 |
|
439 |
+
# 월 추출
|
440 |
+
month = extract_month_from_period(period_text)
|
441 |
+
if not month:
|
442 |
+
month = f"{datetime.now().month}월"
|
443 |
+
|
444 |
+
# 트렌디한 카피 생성
|
445 |
+
copy_data = generate_trendy_copy(concept, month, period_text)
|
446 |
+
|
447 |
# 당첨 혜택이 입력되지 않았으면 기본값 사용
|
448 |
if not prize_benefits or prize_benefits.strip() == "":
|
449 |
default_benefits = """✨ 1등 (1명): 스타벅스 5만원 기프트카드
|
|
|
454 |
else:
|
455 |
benefits_text = prize_benefits
|
456 |
|
457 |
+
# 해시태그 문자열 생성
|
458 |
+
hashtags_text = " ".join(copy_data['hashtags'])
|
459 |
+
|
460 |
+
notice = f"""{copy_data['sub1']}
|
461 |
+
|
462 |
+
💫 {copy_data['main']} 💫
|
463 |
+
|
464 |
+
{copy_data['sub2']}
|
465 |
|
466 |
🎉 {concept} 🎉
|
467 |
|
468 |
📅 이벤트 기간: {period_text} 23:59
|
469 |
|
470 |
+
{hashtags_text}
|
471 |
+
|
472 |
========================
|
473 |
✨ EVENT
|
474 |
특별한 {concept}을 준비했어요!
|
475 |
많은 분들의 적극적인 참여를 기다리고 있습니다 💕
|
476 |
+
|
477 |
+
이번 이벤트는 단순한 참여가 아닌,
|
478 |
+
우리만의 특별한 추억을 만들어가는 시간이에요 ✨
|
479 |
========================
|
480 |
|
481 |
🎯 참여 방법
|
|
|
505 |
📞 문의: 1234-5678
|
506 |
💬 카카오톡: @event_community
|
507 |
|
508 |
+
{hashtags_text}
|
509 |
+
|
510 |
💝 많은 참여 부탁드려요! 감사합니다 💕"""
|
511 |
|
512 |
return notice
|