Update app.py
Browse files
app.py
CHANGED
@@ -1,25 +1,8 @@
|
|
1 |
"""
|
2 |
-
Ultimate Brand Theory Generator
|
3 |
-
|
4 |
-
2025-05-28 | 15๊ฐ ์ด๋ก ์ ํตํฉํ ์ข
ํฉ ๋ธ๋๋ ์์ฑ๊ธฐ
|
5 |
-
|
6 |
-
|
7 |
-
ํตํฉ๋ ์ด๋ก ๋ค:
|
8 |
-
1. Square Theory - ์๋ฏธ์ ์ฌ๊ฐํ ๊ตฌ์กฐ
|
9 |
-
2. Conceptual Blending - ๊ฐ๋
ํผํฉ
|
10 |
-
3. Sound Symbolism - ์ํฅ ์์ง์ฃผ์
|
11 |
-
4. Linguistic Relativity - ์ธ์ด ์๋์ฑ
|
12 |
-
5. Archetype Theory - ์ํ ์ด๋ก
|
13 |
-
6. Jobs-to-be-Done - ํ ์ผ ์ด๋ก
|
14 |
-
7. SCAMPER Method - ์ฐฝ์์ ๋ณํ
|
15 |
-
8. Design Thinking - ๋์์ธ ์ฌ๊ณ
|
16 |
-
9. Biomimicry - ์์ฒด๋ชจ๋ฐฉ
|
17 |
-
10. Cognitive Load - ์ธ์ง ๋ถํ
|
18 |
-
11. Von Restorff Effect - ๊ณ ๋ฆฝ ํจ๊ณผ
|
19 |
-
12. Network Effects - ๋คํธ์ํฌ ํจ๊ณผ
|
20 |
-
13. Memetics - ๋ฐ ์ด๋ก
|
21 |
-
14. Color Psychology - ์์ ์ฌ๋ฆฌํ
|
22 |
-
15. Gestalt Principles - ๊ฒ์ํํธ ์์น
|
23 |
"""
|
24 |
|
25 |
import os
|
@@ -56,314 +39,210 @@ THEORY_DESCRIPTIONS = {
|
|
56 |
"gestalt": "์ง๊ฐ ์๋ฆฌ๋ฅผ ํ์ฉํ ๋ธ๋๋๋ฅผ ๋ง๋ญ๋๋ค. ์ ์ฒด๊ฐ ๋ถ๋ถ์ ํฉ๋ณด๋ค ํฌ๋ค๋ ์์น์ผ๋ก ํตํฉ์ ๋ธ๋๋ ๊ฒฝํ์ ์ค๊ณํฉ๋๋ค."
|
57 |
}
|
58 |
|
59 |
-
#
|
60 |
-
|
61 |
-
๋น์ ์
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
{
|
66 |
-
"
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
""
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
{
|
109 |
-
"brand_name": "๋ธ๋๋๋ช
",
|
110 |
-
"phonetic_analysis": "์์ฑ ๋ถ์",
|
111 |
-
"sound_meaning": "์ํฅ์ด ์ ๋ฌํ๋ ์๋ฏธ",
|
112 |
-
"target_emotion": "๋ชฉํ ๊ฐ์ ",
|
113 |
-
"industry_fit": "์
์ข
์ ํฉ์ฑ",
|
114 |
-
"pronunciation_guide": "๋ฐ์ ๊ฐ์ด๋",
|
115 |
-
"slogan": "์ฌ๋ก๊ฑด"
|
116 |
-
}
|
117 |
-
|
118 |
-
๋ฐ๋์ ์ ํจํ JSON ํ์์ผ๋ก ์๋ตํ์ธ์.
|
119 |
-
"""
|
120 |
-
|
121 |
-
# ===== 4. LINGUISTIC RELATIVITY =====
|
122 |
-
LINGUISTIC_RELATIVITY_PROMPT = """
|
123 |
-
๋น์ ์ Linguistic Relativity ์ ๋ฌธ๊ฐ์
๋๋ค. ์ธ์ด๋ณ ์ฌ๊ณ ๋ฐฉ์ ์ฐจ์ด๋ฅผ ๊ณ ๋ คํฉ๋๋ค.
|
124 |
-
|
125 |
-
๋ค์ JSON ํ์์ผ๋ก ๋ค์ธ์ด ๋ธ๋๋๋ฅผ ์์ฑํ์ธ์:
|
126 |
-
{
|
127 |
-
"brand_name": "๊ธ๋ก๋ฒ ๋ธ๋๋๋ช
",
|
128 |
-
"korean_adaptation": "ํ๊ตญ์ด ์ ์",
|
129 |
-
"english_meaning": "์์ด ์๋ฏธ",
|
130 |
-
"cultural_considerations": "๋ฌธํ์ ๊ณ ๋ ค์ฌํญ",
|
131 |
-
"avoid_meanings": "ํผํด์ผ ํ ์๋ฏธ๋ค",
|
132 |
-
"localization_strategy": "ํ์งํ ์ ๋ต",
|
133 |
-
"slogan": "์ฌ๋ก๊ฑด"
|
134 |
-
}
|
135 |
-
|
136 |
-
๋ฐ๋์ ์ ํจํ JSON ํ์์ผ๋ก ์๋ตํ์ธ์.
|
137 |
-
"""
|
138 |
-
|
139 |
-
# ===== 5. ARCHETYPE THEORY =====
|
140 |
-
ARCHETYPE_THEORY_PROMPT = """
|
141 |
-
๋น์ ์ Jung์ Archetype Theory ์ ๋ฌธ๊ฐ์
๋๋ค. 12๊ฐ์ง ์ํ ์ค ํ๋๋ฅผ ์ ํํ์ฌ ๋ธ๋๋๋ฅผ ๋ง๋ญ๋๋ค.
|
142 |
-
|
143 |
-
12 ์ํ: Innocent, Hero, Outlaw, Explorer, Creator, Ruler, Magician, Lover, Caregiver, Jester, Sage, Regular Guy
|
144 |
-
|
145 |
-
๋ค์ JSON ํ์์ผ๋ก ๋ธ๋๋๋ฅผ ์์ฑํ์ธ์:
|
146 |
-
{
|
147 |
-
"brand_name": "๋ธ๋๋๋ช
",
|
148 |
-
"archetype": "์ ํ๋ ์ํ",
|
149 |
-
"archetype_traits": "์ํ์ ํน์ง๋ค",
|
150 |
-
"brand_personality": "๋ธ๋๋ ์ฑ๊ฒฉ",
|
151 |
-
"visual_direction": "์๊ฐ์ ๋ฐฉํฅ",
|
152 |
-
"voice_tone": "๋ชฉ์๋ฆฌ ํค",
|
153 |
-
"slogan": "์ฌ๋ก๊ฑด",
|
154 |
-
"mythology_reference": "์ ํ์ ์ฐธ์กฐ"
|
155 |
-
}
|
156 |
-
|
157 |
-
๋ฐ๋์ ์ ํจํ JSON ํ์์ผ๋ก ์๋ตํ์ธ์.
|
158 |
-
"""
|
159 |
-
|
160 |
-
# ===== 6. JOBS-TO-BE-DONE =====
|
161 |
-
JOBS_TO_BE_DONE_PROMPT = """
|
162 |
-
๋น์ ์ Jobs-to-be-Done Theory ์ ๋ฌธ๊ฐ์
๋๋ค. ๊ณ ๊ฐ์ด ํด๊ฒฐํ๋ ค๋ '์ผ'์ ์ด์ ์ ๋ง์ถฅ๋๋ค.
|
163 |
-
|
164 |
-
๋ค์ JSON ํ์์ผ๋ก ๋ธ๋๋๋ฅผ ์์ฑํ์ธ์:
|
165 |
-
{
|
166 |
-
"brand_name": "๋ธ๋๋๋ช
",
|
167 |
-
"functional_job": "๊ธฐ๋ฅ์ ์ผ",
|
168 |
-
"emotional_job": "๊ฐ์ ์ ์ผ",
|
169 |
-
"social_job": "์ฌํ์ ์ผ",
|
170 |
-
"job_statement": "ํต์ฌ Job ๋ฌธ์ฅ",
|
171 |
-
"outcome_metrics": "์ฑ๊ณผ ์งํ",
|
172 |
-
"slogan": "์ฌ๋ก๊ฑด",
|
173 |
-
"value_proposition": "๊ฐ์น ์ ์"
|
174 |
-
}
|
175 |
-
|
176 |
-
๋ฐ๋์ ์ ํจํ JSON ํ์์ผ๋ก ์๋ตํ์ธ์.
|
177 |
-
"""
|
178 |
-
|
179 |
-
# ===== 7. SCAMPER METHOD =====
|
180 |
-
SCAMPER_PROMPT = """
|
181 |
-
๋น์ ์ SCAMPER Method ์ ๋ฌธ๊ฐ์
๋๋ค. 7๊ฐ์ง ์ฐฝ์์ ๊ธฐ๋ฒ์ ์ ์ฉํฉ๋๋ค.
|
182 |
-
|
183 |
-
S - Substitute (๋์ฒด)
|
184 |
-
C - Combine (๊ฒฐํฉ)
|
185 |
-
A - Adapt (์ ์)
|
186 |
-
M - Modify/Magnify (์์ /ํ๋)
|
187 |
-
P - Put to another use (๋ค๋ฅธ ์ฉ๋)
|
188 |
-
E - Eliminate (์ ๊ฑฐ)
|
189 |
-
R - Reverse (์ญ์ )
|
190 |
-
|
191 |
-
๋ค์ JSON ํ์์ผ๋ก ๋ธ๋๋๋ฅผ ์์ฑํ์ธ์:
|
192 |
-
{
|
193 |
-
"brand_name": "๋ธ๋๋๋ช
",
|
194 |
-
"scamper_technique": "์ฌ์ฉ๋ ๊ธฐ๋ฒ",
|
195 |
-
"original_concept": "์๋ ๊ฐ๋
",
|
196 |
-
"transformation": "๋ณํ ๊ณผ์ ",
|
197 |
-
"innovative_aspect": "ํ์ ์ ์ธก๋ฉด",
|
198 |
-
"slogan": "์ฌ๋ก๊ฑด"
|
199 |
-
}
|
200 |
-
|
201 |
-
๋ฐ๋์ ์ ํจํ JSON ํ์์ผ๋ก ์๋ตํ์ธ์.
|
202 |
-
"""
|
203 |
-
|
204 |
-
# ===== 8. DESIGN THINKING =====
|
205 |
-
DESIGN_THINKING_PROMPT = """
|
206 |
-
๋น์ ์ IDEO์ Design Thinking ์ ๋ฌธ๊ฐ์
๋๋ค. ์ธ๊ฐ ์ค์ฌ ํ์ ์ ์ถ๊ตฌํฉ๋๋ค.
|
207 |
-
|
208 |
-
๋ค์ JSON ํ์์ผ๋ก ๋ธ๋๋๋ฅผ ์์ฑํ์ธ์:
|
209 |
-
{
|
210 |
-
"brand_name": "๋ธ๋๋๋ช
",
|
211 |
-
"user_insight": "์ฌ์ฉ์ ํต์ฐฐ",
|
212 |
-
"pain_point": "ํด๊ฒฐํ๋ ๋ฌธ์ ์ ",
|
213 |
-
"desirability": "๋ฐ๋์งํจ (์ธ๊ฐ)",
|
214 |
-
"feasibility": "์คํ๊ฐ๋ฅ์ฑ (๊ธฐ์ )",
|
215 |
-
"viability": "์์กด๊ฐ๋ฅ์ฑ (๋น์ฆ๋์ค)",
|
216 |
-
"prototype_concept": "ํ๋กํ ํ์
์ปจ์
",
|
217 |
-
"slogan": "์ฌ๋ก๊ฑด"
|
218 |
-
}
|
219 |
-
|
220 |
-
๋ฐ๋์ ์ ํจํ JSON ํ์์ผ๋ก ์๋ตํ์ธ์.
|
221 |
-
"""
|
222 |
-
|
223 |
-
# ===== 9. BIOMIMICRY =====
|
224 |
-
BIOMIMICRY_PROMPT = """
|
225 |
-
๋น์ ์ Biomimicry ์ ๋ฌธ๊ฐ์
๋๋ค. ์์ฐ์์ ์๊ฐ์ ๋ฐ์ ๋ธ๋๋๋ฅผ ๋ง๋ญ๋๋ค.
|
226 |
-
|
227 |
-
๋ค์ JSON ํ์์ผ๋ก ๋ธ๋๋๋ฅผ ์์ฑํ์ธ์:
|
228 |
-
{
|
229 |
-
"brand_name": "๋ธ๋๋๋ช
",
|
230 |
-
"natural_inspiration": "์์ฐ์ ์๊ฐ์",
|
231 |
-
"biomimetic_principle": "์์ฒด๋ชจ๋ฐฉ ์๋ฆฌ",
|
232 |
-
"form_function": "ํํ์ ๊ธฐ๋ฅ",
|
233 |
-
"sustainability_aspect": "์ง์๊ฐ๋ฅ์ฑ ์ธก๋ฉด",
|
234 |
-
"adaptation_strategy": "์ ์ ์ ๋ต",
|
235 |
-
"slogan": "์ฌ๋ก๊ฑด"
|
236 |
-
}
|
237 |
-
|
238 |
-
๋ฐ๋์ ์ ํจํ JSON ํ์์ผ๋ก ์๋ตํ์ธ์.
|
239 |
-
"""
|
240 |
-
|
241 |
-
# ===== 10. COGNITIVE LOAD =====
|
242 |
-
COGNITIVE_LOAD_PROMPT = """
|
243 |
-
๋น์ ์ Cognitive Load Theory ์ ๋ฌธ๊ฐ์
๋๋ค. ์ธ์ง ์ฒ๋ฆฌ๋ฅผ ์ต์ํํ๋ ๋ธ๋๋๋ฅผ ๋ง๋ญ๋๋ค.
|
244 |
-
|
245 |
-
๋ค์ JSON ํ์์ผ๋ก ๋ธ๋๋๋ฅผ ์์ฑํ์ธ์:
|
246 |
-
{
|
247 |
-
"brand_name": "๋ธ๋๋๋ช
",
|
248 |
-
"syllable_count": "์์ ์",
|
249 |
-
"processing_ease": "์ฒ๋ฆฌ ์ฉ์ด์ฑ ์ ์",
|
250 |
-
"memory_hooks": "๊ธฐ์ต ๊ณ ๋ฆฌ",
|
251 |
-
"pronunciation_simplicity": "๋ฐ์ ๋จ์์ฑ",
|
252 |
-
"cognitive_fluency": "์ธ์ง์ ์ ์ฐฝ์ฑ",
|
253 |
-
"slogan": "์ฌ๋ก๊ฑด"
|
254 |
-
}
|
255 |
-
|
256 |
-
๋ฐ๋์ ์ ํจํ JSON ํ์์ผ๋ก ์๋ตํ์ธ์.
|
257 |
-
"""
|
258 |
-
|
259 |
-
# ===== 11. VON RESTORFF EFFECT =====
|
260 |
-
VON_RESTORFF_PROMPT = """
|
261 |
-
๋น์ ์ Von Restorff Effect ์ ๋ฌธ๊ฐ์
๋๋ค. ๋
ํนํ๊ณ ๊ธฐ์ต์ ๋จ๋ ๋ธ๋๋๋ฅผ ๋ง๋ญ๋๋ค.
|
262 |
-
|
263 |
-
๋ค์ JSON ํ์์ผ๋ก ๋ธ๋๋๋ฅผ ์์ฑํ์ธ์:
|
264 |
-
{
|
265 |
-
"brand_name": "๋ธ๋๋๋ช
",
|
266 |
-
"category_norm": "์นดํ
๊ณ ๋ฆฌ ํ์ค",
|
267 |
-
"deviation_strategy": "์ผํ ์ ๋ต",
|
268 |
-
"uniqueness_factors": "๋
ํน์ฑ ์์๋ค",
|
269 |
-
"memorability_score": "๊ธฐ์ต์ฑ ์ ์",
|
270 |
-
"attention_triggers": "์ฃผ์ ํธ๋ฆฌ๊ฑฐ",
|
271 |
-
"slogan": "์ฌ๋ก๊ฑด"
|
272 |
-
}
|
273 |
-
|
274 |
-
๋ฐ๋์ ์ ํจํ JSON ํ์์ผ๋ก ์๋ตํ์ธ์.
|
275 |
"""
|
276 |
|
277 |
-
#
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
"""
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
"""
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
"""
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
344 |
}
|
345 |
|
346 |
-
|
347 |
-
"""
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
|
|
|
|
|
|
|
|
367 |
|
368 |
def generate_by_theory(industry: str, keywords: str, theory: str, count: int = 3) -> Tuple[str, str]:
|
369 |
"""ํน์ ์ด๋ก ์ผ๋ก ๋ธ๋๋ ์์ฑ"""
|
@@ -371,17 +250,16 @@ def generate_by_theory(industry: str, keywords: str, theory: str, count: int = 3
|
|
371 |
if not industry or not keywords:
|
372 |
return "โ ๏ธ ์
์ข
๊ณผ ํค์๋๋ฅผ ์
๋ ฅํด์ฃผ์ธ์.", ""
|
373 |
|
374 |
-
prompt =
|
375 |
user_input = f"""์
์ข
: {industry}
|
376 |
ํค์๋: {keywords}
|
377 |
|
378 |
์ ์ ๋ณด๋ก {count}๊ฐ์ ๋ธ๋๋๋ฅผ ์์ฑํ์ธ์.
|
379 |
-
|
380 |
-
๊ฒฐ๊ณผ๋ ๋ธ๋๋ ๊ฐ์ฒด๋ค์ JSON ๋ฐฐ์ด์ด์ด์ผ ํฉ๋๋ค."""
|
381 |
|
382 |
try:
|
383 |
response = client.chat.completions.create(
|
384 |
-
model="gpt-4o-mini",
|
385 |
messages=[
|
386 |
{"role": "system", "content": prompt},
|
387 |
{"role": "user", "content": user_input}
|
@@ -395,45 +273,29 @@ def generate_by_theory(industry: str, keywords: str, theory: str, count: int = 3
|
|
395 |
data = json.loads(content)
|
396 |
|
397 |
# ์๋ต ์ ๊ทํ
|
398 |
-
if
|
399 |
-
|
400 |
-
results = data["results"]
|
401 |
-
elif "brands" in data:
|
402 |
-
results = data["brands"]
|
403 |
-
elif "brand_name" in data:
|
404 |
-
# ๋จ์ผ ๋ธ๋๋๋ฅผ ๋ฐฐ์ด๋ก ๋ณํ
|
405 |
-
results = [data]
|
406 |
-
else:
|
407 |
-
# ๋ํ๋ ์๋ต ์ฒ๋ฆฌ
|
408 |
-
results = []
|
409 |
-
for key, value in data.items():
|
410 |
-
if isinstance(value, list):
|
411 |
-
results = value
|
412 |
-
break
|
413 |
-
elif isinstance(value, dict) and "brand_name" in value:
|
414 |
-
results = [value]
|
415 |
-
break
|
416 |
else:
|
417 |
-
results = data
|
418 |
|
419 |
if not isinstance(results, list):
|
420 |
results = [results]
|
421 |
|
422 |
# ๋งํฌ๋ค์ด ์์ฑ
|
423 |
-
markdown =
|
424 |
|
425 |
# HTML ์๊ฐํ ์์ฑ
|
426 |
-
html =
|
427 |
|
428 |
return markdown, html
|
429 |
|
430 |
except Exception as e:
|
431 |
error_msg = f"โ {theory} ์ด๋ก ์ค๋ฅ: {str(e)}"
|
432 |
-
print(error_msg)
|
433 |
return error_msg, ""
|
434 |
|
435 |
-
def
|
436 |
-
"""
|
437 |
|
438 |
theory_names = {
|
439 |
"square": "Square Theory",
|
@@ -454,21 +316,10 @@ def generate_theory_markdown(theory: str, results: List[Dict], industry: str, ke
|
|
454 |
}
|
455 |
|
456 |
theory_icons = {
|
457 |
-
"square": "๐ฆ",
|
458 |
-
"
|
459 |
-
"
|
460 |
-
"
|
461 |
-
"archetype": "๐ญ",
|
462 |
-
"jobs": "โ
",
|
463 |
-
"scamper": "๐ง",
|
464 |
-
"design": "๐ญ",
|
465 |
-
"biomimicry": "๐ฟ",
|
466 |
-
"cognitive": "๐ง ",
|
467 |
-
"vonrestorff": "โก",
|
468 |
-
"network": "๐",
|
469 |
-
"memetics": "๐งฌ",
|
470 |
-
"color": "๐จ",
|
471 |
-
"gestalt": "๐๏ธ"
|
472 |
}
|
473 |
|
474 |
markdown = f"""# {theory_icons[theory]} {theory_names[theory]}
|
@@ -485,296 +336,271 @@ def generate_theory_markdown(theory: str, results: List[Dict], industry: str, ke
|
|
485 |
"""
|
486 |
|
487 |
for idx, result in enumerate(results, 1):
|
488 |
-
|
489 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
490 |
|
491 |
markdown += f"\n## {idx}. {brand_name}\n"
|
492 |
markdown += f"**์ฌ๋ก๊ฑด**: *\"{slogan}\"*\n\n"
|
493 |
|
494 |
-
#
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
-
|
512 |
-
-
|
513 |
-
-
|
514 |
-
"""
|
515 |
-
elif theory == "sound":
|
516 |
-
markdown += f"""
|
517 |
-
### ์ํฅ ๋ถ์
|
518 |
-
- **์์ฑ ๋ถ์**: {result.get('phonetic_analysis')}
|
519 |
-
- **์ํฅ ์๋ฏธ**: {result.get('sound_meaning')}
|
520 |
-
- **๋ชฉํ ๊ฐ์ **: {result.get('target_emotion')}
|
521 |
-
- **๋ฐ์ ๊ฐ์ด๋**: {result.get('pronunciation_guide')}
|
522 |
-
"""
|
523 |
-
elif theory == "archetype":
|
524 |
-
markdown += f"""
|
525 |
-
### ์ํ ๋ถ์
|
526 |
-
- **์ํ**: {result.get('archetype')}
|
527 |
-
- **์ํ ํน์ง**: {result.get('archetype_traits')}
|
528 |
-
- **๋ธ๋๋ ์ฑ๊ฒฉ**: {result.get('brand_personality')}
|
529 |
-
- **๋ชฉ์๋ฆฌ ํค**: {result.get('voice_tone')}
|
530 |
"""
|
531 |
|
532 |
-
#
|
533 |
-
|
534 |
-
|
535 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
536 |
|
537 |
markdown += "\n---\n"
|
538 |
|
539 |
return markdown
|
540 |
|
541 |
-
def
|
542 |
-
"""
|
543 |
|
544 |
html_parts = []
|
545 |
|
546 |
for idx, result in enumerate(results, 1):
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
557 |
else:
|
558 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
559 |
|
560 |
return "\n".join(html_parts)
|
561 |
|
562 |
-
|
563 |
-
|
564 |
-
"""Square Theory ์๊ฐํ"""
|
565 |
return f"""
|
566 |
-
<div style="
|
567 |
-
|
568 |
-
<
|
569 |
-
|
570 |
-
|
571 |
-
<div style="position: relative; width: 100%; height: 300px; background: rgba(255,255,255,0.1); border-radius: 12px; padding: 30px; margin-top: 20px;">
|
572 |
-
<!-- Square ๊ตฌ์กฐ ์๊ฐํ -->
|
573 |
-
<div style="position: absolute; top: 30px; left: 30px; background: rgba(255,255,255,0.9); color: #667eea; padding: 15px 20px; border-radius: 8px; font-weight: bold; box-shadow: 0 4px 15px rgba(0,0,0,0.1);">
|
574 |
-
{brand.get('tl', '?')}
|
575 |
</div>
|
576 |
-
<div style="position: absolute; top:
|
577 |
-
{
|
578 |
</div>
|
579 |
-
<div style="position: absolute; bottom:
|
580 |
-
{
|
581 |
</div>
|
582 |
-
<div style="position: absolute; bottom:
|
583 |
-
{
|
584 |
</div>
|
585 |
|
586 |
-
<!--
|
587 |
-
<div style="position: absolute; top:
|
588 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
589 |
</div>
|
590 |
</div>
|
591 |
</div>
|
592 |
-
</div>
|
593 |
"""
|
594 |
|
595 |
-
def
|
596 |
-
"""Conceptual Blending ์๊ฐํ"""
|
597 |
-
brand_name = brand.get('brand_name', 'Brand')
|
598 |
-
input1 = brand.get('input_space1', 'Concept 1')
|
599 |
-
input2 = brand.get('input_space2', 'Concept 2')
|
600 |
-
blended = brand.get('blended_space', 'Blended Concept')
|
601 |
-
slogan = brand.get('slogan', '')
|
602 |
-
|
603 |
return f"""
|
604 |
-
<div style="
|
605 |
-
|
606 |
-
<
|
607 |
-
|
608 |
-
<div style="display: flex; justify-content: space-around; align-items: center; margin: 30px 0;">
|
609 |
-
<div style="text-align: center; padding: 30px; background: rgba(255,255,255,0.9); color: #ff6b6b; border-radius: 50%; width: 140px; height: 140px; display: flex; align-items: center; justify-content: center; box-shadow: 0 5px 20px rgba(0,0,0,0.2);">
|
610 |
<div>
|
611 |
<strong>Input 1</strong><br>
|
612 |
-
<span style="font-size: 0.9em;">{
|
613 |
</div>
|
614 |
</div>
|
615 |
|
616 |
-
<div style="font-size:
|
617 |
|
618 |
-
<div style="text-align: center; padding:
|
619 |
<div>
|
620 |
<strong>Input 2</strong><br>
|
621 |
-
<span style="font-size: 0.9em;">{
|
622 |
</div>
|
623 |
</div>
|
624 |
|
625 |
-
<div style="font-size:
|
626 |
-
|
627 |
-
<div style="text-align: center; padding: 30px; background: white; color: #2c3e50; border-radius: 20px; width: 180px; height: 180px; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 25px rgba(0,0,0,0.3);">
|
628 |
-
<div>
|
629 |
-
<strong style="font-size: 1.2em;">Blend</strong><br>
|
630 |
-
<span style="font-size: 0.95em;">{blended}</span>
|
631 |
-
</div>
|
632 |
-
</div>
|
633 |
-
</div>
|
634 |
-
|
635 |
-
<p style="text-align: center; font-style: italic; color: white; font-size: 1.1em; margin-top: 20px;">"{slogan}"</p>
|
636 |
-
</div>
|
637 |
-
</div>
|
638 |
-
"""
|
639 |
-
|
640 |
-
def visualize_sound_symbolism(brand: Dict) -> str:
|
641 |
-
"""Sound Symbolism ์๊ฐํ"""
|
642 |
-
return f"""
|
643 |
-
<div style="max-width: 700px; margin: 20px auto; font-family: -apple-system, sans-serif;">
|
644 |
-
<div style="background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); padding: 40px; border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.2);">
|
645 |
-
<h2 style="text-align: center; color: white; margin-bottom: 20px;">{brand.get('brand_name', 'Brand')}</h2>
|
646 |
-
|
647 |
-
<div style="text-align: center; margin: 30px 0;">
|
648 |
-
<div style="font-size: 4em; letter-spacing: 0.3em; color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.2); font-weight: bold;">
|
649 |
-
{brand.get('brand_name', 'BRAND')}
|
650 |
-
</div>
|
651 |
-
</div>
|
652 |
-
|
653 |
-
<div style="background: rgba(255,255,255,0.9); padding: 25px; border-radius: 15px; margin: 20px 0;">
|
654 |
-
<div style="text-align: center; margin-bottom: 15px;">
|
655 |
-
<strong style="color: #fa709a; font-size: 1.2em;">์์ฑ ๋ถ์</strong><br>
|
656 |
-
<span style="color: #555;">{brand.get('phonetic_analysis', '')}</span>
|
657 |
-
</div>
|
658 |
|
659 |
-
<div style="text-align: center;">
|
660 |
-
<strong
|
661 |
-
<span style="
|
662 |
</div>
|
663 |
</div>
|
664 |
-
|
665 |
-
<div style="text-align: center; color: white; font-style: italic;">
|
666 |
-
๋ฐ์: {brand.get('pronunciation_guide', '')}
|
667 |
-
</div>
|
668 |
</div>
|
669 |
-
</div>
|
670 |
"""
|
671 |
|
672 |
-
def
|
673 |
-
"""
|
674 |
-
|
675 |
-
|
676 |
-
"Creator": "#9b59b6",
|
677 |
-
"Sage": "#3498db",
|
678 |
-
"Explorer": "#1abc9c",
|
679 |
-
"Innocent": "#f1c40f",
|
680 |
-
"Jester": "#e67e22",
|
681 |
-
"Lover": "#e91e63",
|
682 |
-
"Caregiver": "#00bcd4",
|
683 |
-
"Ruler": "#795548",
|
684 |
-
"Magician": "#673ab7",
|
685 |
-
"Outlaw": "#212121",
|
686 |
-
"Regular Guy": "#607d8b"
|
687 |
-
}
|
688 |
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
<div style="max-width: 700px; margin: 20px auto; font-family: -apple-system, sans-serif;">
|
694 |
-
<div style="background: linear-gradient(135deg, {color} 0%, #2c3e50 100%); padding: 40px; border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.2);">
|
695 |
-
<h2 style="text-align: center; color: white; margin-bottom: 30px;">{brand.get('brand_name', 'Brand')}</h2>
|
696 |
-
|
697 |
-
<div style="text-align: center; margin: 30px 0;">
|
698 |
-
<div style="display: inline-block; padding: 50px; background: rgba(255,255,255,0.15); color: white; border-radius: 50%; width: 250px; height: 250px; border: 3px solid rgba(255,255,255,0.3);">
|
699 |
-
<h3 style="margin: 0 0 15px 0; font-size: 2em;">{archetype}</h3>
|
700 |
-
<p style="margin: 0; font-size: 1em; line-height: 1.5;">{brand.get('archetype_traits', '')}</p>
|
701 |
-
</div>
|
702 |
-
</div>
|
703 |
-
|
704 |
-
<div style="background: rgba(255,255,255,0.9); padding: 25px; border-radius: 15px; margin: 20px 0;">
|
705 |
-
<p style="margin: 10px 0;"><strong style="color: {color};">๋ธ๋๋ ์ฑ๊ฒฉ</strong>: {brand.get('brand_personality', '')}</p>
|
706 |
-
<p style="margin: 10px 0;"><strong style="color: {color};">๋ชฉ์๋ฆฌ ํค</strong>: {brand.get('voice_tone', '')}</p>
|
707 |
-
</div>
|
708 |
-
|
709 |
-
<p style="text-align: center; font-style: italic; font-size: 1.3em; color: white; margin-top: 30px;">"{brand.get('slogan', '')}"</p>
|
710 |
-
</div>
|
711 |
-
</div>
|
712 |
"""
|
713 |
-
|
714 |
-
def visualize_color_psychology(brand: Dict) -> str:
|
715 |
-
"""Color Psychology ์๊ฐํ"""
|
716 |
-
color = brand.get('primary_color', '#3498db')
|
717 |
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
<div style="text-align: center; margin: 30px 0;">
|
724 |
-
<div style="display: inline-block; width: 300px; height: 300px; background: {color}; border-radius: 20px; box-shadow: 0 15px 40px rgba(0,0,0,0.3); position: relative; overflow: hidden;">
|
725 |
-
<div style="position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); color: white; font-size: 1.5em; font-weight: bold; text-shadow: 2px 2px 4px rgba(0,0,0,0.5);">
|
726 |
-
{brand.get('primary_color', '')}
|
727 |
-
</div>
|
728 |
-
</div>
|
729 |
-
</div>
|
730 |
-
|
731 |
-
<div style="background: white; padding: 25px; border-radius: 15px; box-shadow: 0 5px 15px rgba(0,0,0,0.1);">
|
732 |
-
<p style="margin: 10px 0;"><strong style="color: {color};">์์ ์๋ฏธ</strong>: {brand.get('color_meaning', '')}</p>
|
733 |
-
<p style="margin: 10px 0;"><strong style="color: {color};">๊ฐ์ ์ ๋ฐ์</strong>: {brand.get('emotional_response', '')}</p>
|
734 |
-
<p style="margin: 10px 0;"><strong style="color: {color};">๋ฌธํ์ ์ฐ์</strong>: {brand.get('cultural_associations', '')}</p>
|
735 |
-
</div>
|
736 |
-
|
737 |
-
<p style="text-align: center; font-style: italic; margin-top: 30px; color: #7f8c8d; font-size: 1.2em;">"{brand.get('slogan', '')}"</p>
|
738 |
-
</div>
|
739 |
-
</div>
|
740 |
"""
|
741 |
-
|
742 |
-
def visualize_generic_brand(brand: Dict, theory: str) -> str:
|
743 |
-
"""์ผ๋ฐ์ ์ธ ๋ธ๋๋ ์๊ฐํ"""
|
744 |
-
# JSON์ HTML๋ก ๋ณํ (f-string ๋ฐ์์ ์ฒ๋ฆฌ)
|
745 |
-
json_str = json.dumps(brand, ensure_ascii=False, indent=2)
|
746 |
-
|
747 |
-
theory_gradients = {
|
748 |
-
"jobs": "linear-gradient(135deg, #a8edea 0%, #fed6e3 100%)",
|
749 |
-
"scamper": "linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%)",
|
750 |
-
"design": "linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%)",
|
751 |
-
"biomimicry": "linear-gradient(135deg, #d4fc79 0%, #96e6a1 100%)",
|
752 |
-
"cognitive": "linear-gradient(135deg, #fa709a 0%, #fee140 100%)",
|
753 |
-
"vonrestorff": "linear-gradient(135deg, #f093fb 0%, #f5576c 100%)",
|
754 |
-
"network": "linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)",
|
755 |
-
"memetics": "linear-gradient(135deg, #43e97b 0%, #38f9d7 100%)",
|
756 |
-
"gestalt": "linear-gradient(135deg, #fd6585 0%, #0d25b9 100%)"
|
757 |
-
}
|
758 |
-
|
759 |
-
gradient = theory_gradients.get(theory, "linear-gradient(135deg, #667eea 0%, #764ba2 100%)")
|
760 |
|
761 |
-
html
|
762 |
-
<div style="max-width: 700px; margin: 20px auto; font-family: -apple-system, sans-serif;">
|
763 |
-
<div style="background: {gradient}; padding: 40px; border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.2);">
|
764 |
-
<h2 style="text-align: center; color: white; margin-bottom: 10px;">{brand.get('brand_name', 'Brand')}</h2>
|
765 |
-
<p style="text-align: center; font-style: italic; color: rgba(255,255,255,0.9); margin-bottom: 30px; font-size: 1.2em;">"{brand.get('slogan', '')}"</p>
|
766 |
-
|
767 |
-
<div style="background: rgba(255,255,255,0.95); padding: 25px; border-radius: 15px; font-family: 'Courier New', monospace; font-size: 0.9em;">
|
768 |
-
<pre style="margin: 0; white-space: pre-wrap; color: #2c3e50;">{json_str}</pre>
|
769 |
</div>
|
770 |
</div>
|
771 |
-
</div>
|
772 |
"""
|
773 |
return html
|
774 |
|
775 |
# Gradio UI
|
776 |
with gr.Blocks(
|
777 |
-
title="Ultimate Brand Theory Generator",
|
778 |
theme=gr.themes.Soft(),
|
779 |
css="""
|
780 |
.gradio-container {
|
@@ -791,7 +617,7 @@ with gr.Blocks(
|
|
791 |
<h1 style="font-size: 2.5em; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 10px;">
|
792 |
๐ Ultimate Brand Theory Generator
|
793 |
</h1>
|
794 |
-
<p style="font-size: 1.2em; color: #7f8c8d;">15๊ฐ ์ด๋ก ์ ํ์ฉํ ์ข
ํฉ ๋ธ๋๋
|
795 |
</div>
|
796 |
""")
|
797 |
|
@@ -818,247 +644,70 @@ with gr.Blocks(
|
|
818 |
|
819 |
gr.Markdown("""
|
820 |
<div style="background: #e3f2fd; padding: 15px; border-radius: 8px; margin-top: 20px;">
|
821 |
-
<h4 style="margin-top: 0; color: #1976d2;"
|
822 |
-
<
|
823 |
-
|
824 |
-
<li
|
825 |
-
<li
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
|
|
830 |
</div>
|
831 |
""")
|
832 |
|
833 |
with gr.Column(scale=3):
|
834 |
# 15๊ฐ ํญ ์์ฑ
|
835 |
with gr.Tabs():
|
836 |
-
#
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
)
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
blending_btn.click(
|
855 |
-
lambda i, k: generate_by_theory(i, k, "blending"),
|
856 |
-
inputs=[industry_input, keywords_input],
|
857 |
-
outputs=[blending_output, blending_visual]
|
858 |
-
)
|
859 |
-
|
860 |
-
# 3. Sound Symbolism
|
861 |
-
with gr.Tab("๐ Sound Symbolism"):
|
862 |
-
with gr.Row():
|
863 |
-
sound_btn = gr.Button("Sound Symbolism์ผ๋ก ์์ฑ", variant="primary", size="sm")
|
864 |
-
sound_output = gr.Markdown()
|
865 |
-
sound_visual = gr.HTML()
|
866 |
-
sound_btn.click(
|
867 |
-
lambda i, k: generate_by_theory(i, k, "sound"),
|
868 |
-
inputs=[industry_input, keywords_input],
|
869 |
-
outputs=[sound_output, sound_visual]
|
870 |
-
)
|
871 |
-
|
872 |
-
# 4. Linguistic Relativity
|
873 |
-
with gr.Tab("๐ Linguistic Relativity"):
|
874 |
-
with gr.Row():
|
875 |
-
linguistic_btn = gr.Button("Linguistic Relativity๋ก ์์ฑ", variant="primary", size="sm")
|
876 |
-
linguistic_output = gr.Markdown()
|
877 |
-
linguistic_visual = gr.HTML()
|
878 |
-
linguistic_btn.click(
|
879 |
-
lambda i, k: generate_by_theory(i, k, "linguistic"),
|
880 |
-
inputs=[industry_input, keywords_input],
|
881 |
-
outputs=[linguistic_output, linguistic_visual]
|
882 |
-
)
|
883 |
-
|
884 |
-
# 5. Archetype Theory
|
885 |
-
with gr.Tab("๐ญ Archetype Theory"):
|
886 |
-
with gr.Row():
|
887 |
-
archetype_btn = gr.Button("Archetype Theory๋ก ์์ฑ", variant="primary", size="sm")
|
888 |
-
archetype_output = gr.Markdown()
|
889 |
-
archetype_visual = gr.HTML()
|
890 |
-
archetype_btn.click(
|
891 |
-
lambda i, k: generate_by_theory(i, k, "archetype"),
|
892 |
-
inputs=[industry_input, keywords_input],
|
893 |
-
outputs=[archetype_output, archetype_visual]
|
894 |
-
)
|
895 |
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
-
|
906 |
-
|
907 |
-
|
908 |
-
# 7. SCAMPER
|
909 |
-
with gr.Tab("๐ง SCAMPER Method"):
|
910 |
-
with gr.Row():
|
911 |
-
scamper_btn = gr.Button("SCAMPER Method๋ก ์์ฑ", variant="primary", size="sm")
|
912 |
-
scamper_output = gr.Markdown()
|
913 |
-
scamper_visual = gr.HTML()
|
914 |
-
scamper_btn.click(
|
915 |
-
lambda i, k: generate_by_theory(i, k, "scamper"),
|
916 |
-
inputs=[industry_input, keywords_input],
|
917 |
-
outputs=[scamper_output, scamper_visual]
|
918 |
-
)
|
919 |
-
|
920 |
-
# 8. Design Thinking
|
921 |
-
with gr.Tab("๐ญ Design Thinking"):
|
922 |
-
with gr.Row():
|
923 |
-
design_btn = gr.Button("Design Thinking์ผ๋ก ์์ฑ", variant="primary", size="sm")
|
924 |
-
design_output = gr.Markdown()
|
925 |
-
design_visual = gr.HTML()
|
926 |
-
design_btn.click(
|
927 |
-
lambda i, k: generate_by_theory(i, k, "design"),
|
928 |
-
inputs=[industry_input, keywords_input],
|
929 |
-
outputs=[design_output, design_visual]
|
930 |
-
)
|
931 |
-
|
932 |
-
# 9. Biomimicry
|
933 |
-
with gr.Tab("๐ฟ Biomimicry"):
|
934 |
-
with gr.Row():
|
935 |
-
biomimicry_btn = gr.Button("Biomimicry๋ก ์์ฑ", variant="primary", size="sm")
|
936 |
-
biomimicry_output = gr.Markdown()
|
937 |
-
biomimicry_visual = gr.HTML()
|
938 |
-
biomimicry_btn.click(
|
939 |
-
lambda i, k: generate_by_theory(i, k, "biomimicry"),
|
940 |
-
inputs=[industry_input, keywords_input],
|
941 |
-
outputs=[biomimicry_output, biomimicry_visual]
|
942 |
-
)
|
943 |
-
|
944 |
-
# 10. Cognitive Load
|
945 |
-
with gr.Tab("๐ง Cognitive Load"):
|
946 |
-
with gr.Row():
|
947 |
-
cognitive_btn = gr.Button("Cognitive Load๋ก ์์ฑ", variant="primary", size="sm")
|
948 |
-
cognitive_output = gr.Markdown()
|
949 |
-
cognitive_visual = gr.HTML()
|
950 |
-
cognitive_btn.click(
|
951 |
-
lambda i, k: generate_by_theory(i, k, "cognitive"),
|
952 |
-
inputs=[industry_input, keywords_input],
|
953 |
-
outputs=[cognitive_output, cognitive_visual]
|
954 |
-
)
|
955 |
-
|
956 |
-
# 11. Von Restorff
|
957 |
-
with gr.Tab("โก Von Restorff Effect"):
|
958 |
-
with gr.Row():
|
959 |
-
vonrestorff_btn = gr.Button("Von Restorff Effect๋ก ์์ฑ", variant="primary", size="sm")
|
960 |
-
vonrestorff_output = gr.Markdown()
|
961 |
-
vonrestorff_visual = gr.HTML()
|
962 |
-
vonrestorff_btn.click(
|
963 |
-
lambda i, k: generate_by_theory(i, k, "vonrestorff"),
|
964 |
-
inputs=[industry_input, keywords_input],
|
965 |
-
outputs=[vonrestorff_output, vonrestorff_visual]
|
966 |
-
)
|
967 |
-
|
968 |
-
# 12. Network Effects
|
969 |
-
with gr.Tab("๐ Network Effects"):
|
970 |
-
with gr.Row():
|
971 |
-
network_btn = gr.Button("Network Effects๋ก ์์ฑ", variant="primary", size="sm")
|
972 |
-
network_output = gr.Markdown()
|
973 |
-
network_visual = gr.HTML()
|
974 |
-
network_btn.click(
|
975 |
-
lambda i, k: generate_by_theory(i, k, "network"),
|
976 |
-
inputs=[industry_input, keywords_input],
|
977 |
-
outputs=[network_output, network_visual]
|
978 |
-
)
|
979 |
-
|
980 |
-
# 13. Memetics
|
981 |
-
with gr.Tab("๐งฌ Memetics"):
|
982 |
-
with gr.Row():
|
983 |
-
memetics_btn = gr.Button("Memetics๋ก ์์ฑ", variant="primary", size="sm")
|
984 |
-
memetics_output = gr.Markdown()
|
985 |
-
memetics_visual = gr.HTML()
|
986 |
-
memetics_btn.click(
|
987 |
-
lambda i, k: generate_by_theory(i, k, "memetics"),
|
988 |
-
inputs=[industry_input, keywords_input],
|
989 |
-
outputs=[memetics_output, memetics_visual]
|
990 |
-
)
|
991 |
-
|
992 |
-
# 14. Color Psychology
|
993 |
-
with gr.Tab("๐จ Color Psychology"):
|
994 |
-
with gr.Row():
|
995 |
-
color_btn = gr.Button("Color Psychology๋ก ์์ฑ", variant="primary", size="sm")
|
996 |
-
color_output = gr.Markdown()
|
997 |
-
color_visual = gr.HTML()
|
998 |
-
color_btn.click(
|
999 |
-
lambda i, k: generate_by_theory(i, k, "color"),
|
1000 |
-
inputs=[industry_input, keywords_input],
|
1001 |
-
outputs=[color_output, color_visual]
|
1002 |
-
)
|
1003 |
-
|
1004 |
-
# 15. Gestalt Principles
|
1005 |
-
with gr.Tab("๐๏ธ Gestalt Principles"):
|
1006 |
-
with gr.Row():
|
1007 |
-
gestalt_btn = gr.Button("Gestalt Principles๋ก ์์ฑ", variant="primary", size="sm")
|
1008 |
-
gestalt_output = gr.Markdown()
|
1009 |
-
gestalt_visual = gr.HTML()
|
1010 |
-
gestalt_btn.click(
|
1011 |
-
lambda i, k: generate_by_theory(i, k, "gestalt"),
|
1012 |
-
inputs=[industry_input, keywords_input],
|
1013 |
-
outputs=[gestalt_output, gestalt_visual]
|
1014 |
-
)
|
1015 |
|
1016 |
gr.Markdown("""
|
1017 |
<div style="background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 30px; border-radius: 15px; margin-top: 40px;">
|
1018 |
-
<h3 style="margin-top: 0;"
|
1019 |
-
<
|
1020 |
-
|
1021 |
-
<h4>1. ๋น๊ต ๋ถ์</h4>
|
1022 |
-
<p style="margin: 5px 0;">๊ฐ ์ด๋ก ์ ๊ฒฐ๊ณผ๋ฅผ ๋น๊ตํ์ฌ ๊ฐ์ฅ ์ ํฉํ ๋ธ๋๋ ์ ํ</p>
|
1023 |
-
</div>
|
1024 |
-
<div>
|
1025 |
-
<h4>2. ํ์ด๋ธ๋ฆฌ๋ ์ ๊ทผ</h4>
|
1026 |
-
<p style="margin: 5px 0;">์ฌ๋ฌ ์ด๋ก ์ ์ฅ์ ์ ๊ฒฐํฉํ ์๋ก์ด ๋ธ๋๋ ์ฐฝ์กฐ</p>
|
1027 |
-
</div>
|
1028 |
-
<div>
|
1029 |
-
<h4>3. ํ๊ฒ๋ณ ์ ํ</h4>
|
1030 |
-
<p style="margin: 5px 0;">๋ชฉํ ๊ณ ๊ฐ์ธต์ ๋ฐ๋ผ ๊ฐ์ฅ ํจ๊ณผ์ ์ธ ์ด๋ก ์ ํ</p>
|
1031 |
-
</div>
|
1032 |
-
<div>
|
1033 |
-
<h4>4. A/B ํ
์คํธ</h4>
|
1034 |
-
<p style="margin: 5px 0;">๋ค์ํ ์ด๋ก ๊ธฐ๋ฐ ๋ธ๋๋๋ก ์์ฅ ํ
์คํธ</p>
|
1035 |
-
</div>
|
1036 |
-
</div>
|
1037 |
-
</div>
|
1038 |
-
|
1039 |
-
<div style="margin-top: 30px; padding: 20px; background: #f8f9fa; border-radius: 10px;">
|
1040 |
-
<h3 style="margin-top: 0;">๐ ๊ฐ ์ด๋ก ์ ๊ฐ์ </h3>
|
1041 |
-
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 15px; margin-top: 15px;">
|
1042 |
-
<div>
|
1043 |
-
<strong style="color: #3498db;">์ฆ๊ฐ์ ์ดํด</strong>: Cognitive Load, Sound Symbolism
|
1044 |
-
</div>
|
1045 |
-
<div>
|
1046 |
-
<strong style="color: #e74c3c;">๊ฐ์ ์ ์ฐ๊ฒฐ</strong>: Archetype, Color Psychology
|
1047 |
-
</div>
|
1048 |
-
<div>
|
1049 |
-
<strong style="color: #f39c12;">์ฐจ๋ณํ</strong>: Von Restorff, SCAMPER
|
1050 |
-
</div>
|
1051 |
-
<div>
|
1052 |
-
<strong style="color: #27ae60;">๋ฐ์ด๋ด ์ ์ฌ๋ ฅ</strong>: Memetics, Network Effects
|
1053 |
-
</div>
|
1054 |
<div>
|
1055 |
-
<
|
|
|
1056 |
</div>
|
1057 |
<div>
|
1058 |
-
<
|
|
|
1059 |
</div>
|
1060 |
<div>
|
1061 |
-
<
|
|
|
1062 |
</div>
|
1063 |
</div>
|
1064 |
</div>
|
|
|
1 |
"""
|
2 |
+
Ultimate Brand Theory Generator - Unified Output Version
|
3 |
+
========================================================
|
4 |
+
2025-05-28 | 15๊ฐ ์ด๋ก ์ ํตํฉํ ์ข
ํฉ ๋ธ๋๋ ์์ฑ๊ธฐ (ํต์ผ๋ ์ถ๋ ฅ ๊ตฌ์กฐ)
|
5 |
+
------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
"""
|
7 |
|
8 |
import os
|
|
|
39 |
"gestalt": "์ง๊ฐ ์๋ฆฌ๋ฅผ ํ์ฉํ ๋ธ๋๋๋ฅผ ๋ง๋ญ๋๋ค. ์ ์ฒด๊ฐ ๋ถ๋ถ์ ํฉ๋ณด๋ค ํฌ๋ค๋ ์์น์ผ๋ก ํตํฉ์ ๋ธ๋๋ ๊ฒฝํ์ ์ค๊ณํฉ๋๋ค."
|
40 |
}
|
41 |
|
42 |
+
# ํต์ผ๋ ๊ธฐ๋ณธ ํ๋กฌํํธ ํ
ํ๋ฆฟ
|
43 |
+
UNIFIED_BASE_PROMPT = """
|
44 |
+
๋น์ ์ {theory_name} ์ ๋ฌธ๊ฐ์
๋๋ค. {theory_description}
|
45 |
+
|
46 |
+
์ฌ์ฉ์ ์
๋ ฅ(์
์ข
/ํค์๋)์ ๋ฐ์ ๋ค์๊ณผ ๊ฐ์ ํต์ผ๋ JSON ํ์์ ๋ฐฐ์ด์ ์์ฑํ์ธ์:
|
47 |
+
|
48 |
+
{{
|
49 |
+
"brands": [
|
50 |
+
{{
|
51 |
+
"core": {{
|
52 |
+
"brand_name": "๋ธ๋๋๋ช
",
|
53 |
+
"slogan": "์ฌ๋ก๊ฑด",
|
54 |
+
"core_value": "ํต์ฌ ๊ฐ์น",
|
55 |
+
"target_emotion": "๋ชฉํ ๊ฐ์ ",
|
56 |
+
"brand_personality": "๋ธ๋๋ ์ฑ๊ฒฉ"
|
57 |
+
}},
|
58 |
+
"visual": {{
|
59 |
+
"primary_color": "#HEX์ฝ๋",
|
60 |
+
"color_meaning": "์์ ์๋ฏธ",
|
61 |
+
"visual_concept": "์๊ฐ์ ์ปจ์
",
|
62 |
+
"typography_style": "ํ์ดํฌ๊ทธ๋ํผ ์คํ์ผ"
|
63 |
+
}},
|
64 |
+
"linguistic": {{
|
65 |
+
"pronunciation": "๋ฐ์ ๊ฐ์ด๋",
|
66 |
+
"etymology": "์ด์/๊ตฌ์ฑ",
|
67 |
+
"global_adaptability": "๊ธ๋ก๋ฒ ์ ์์ฑ",
|
68 |
+
"memorable_factor": "๊ธฐ์ต ์ฉ์ด์ฑ ์์"
|
69 |
+
}},
|
70 |
+
"strategic": {{
|
71 |
+
"differentiation": "์ฐจ๋ณํ ํฌ์ธํธ",
|
72 |
+
"market_positioning": "์์ฅ ํฌ์ง์
๋",
|
73 |
+
"growth_potential": "์ฑ์ฅ ์ ์ฌ๋ ฅ",
|
74 |
+
"implementation_ease": "์คํ ์ฉ์ด์ฑ"
|
75 |
+
}},
|
76 |
+
"theory_specific": {{
|
77 |
+
{theory_specific_fields}
|
78 |
+
}},
|
79 |
+
"evaluation": {{
|
80 |
+
"creativity_score": 0-10,
|
81 |
+
"memorability_score": 0-10,
|
82 |
+
"relevance_score": 0-10,
|
83 |
+
"overall_effectiveness": "์ ์ฒด์ ์ธ ํจ๊ณผ์ฑ ์ค๋ช
"
|
84 |
+
}}
|
85 |
+
}}
|
86 |
+
]
|
87 |
+
}}
|
88 |
+
|
89 |
+
๋ฐ๋์ ์ ํจํ JSON ํ์์ผ๋ก ์๋ตํ๊ณ , ๋ชจ๋ ํ๋๋ฅผ ์ฑ์์ฃผ์ธ์.
|
90 |
+
๊ฐ ์ด๋ก ์ ํน์ฑ์ theory_specific ์น์
์ ๋ด๋, ๋๋จธ์ง๋ ํต์ผ๋ ๊ตฌ์กฐ๋ฅผ ์ ์งํ์ธ์.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
"""
|
92 |
|
93 |
+
# ์ด๋ก ๋ณ ํน์ ํ๋ ์ ์
|
94 |
+
THEORY_SPECIFIC_FIELDS = {
|
95 |
+
"square": """
|
96 |
+
"tl": "์ผ์ชฝ์๋จ",
|
97 |
+
"tr": "์ค๋ฅธ์ชฝ์๋จ",
|
98 |
+
"bl": "์ผ์ชฝํ๋จ",
|
99 |
+
"br": "์ค๋ฅธ์ชฝํ๋จ",
|
100 |
+
"top_edge": "์๋จ ๊ด๊ณ",
|
101 |
+
"bottom_edge": "ํ๋จ ๊ด๊ณ",
|
102 |
+
"left_edge": "์ผ์ชฝ ๊ด๊ณ",
|
103 |
+
"right_edge": "์ค๋ฅธ์ชฝ ๊ด๊ณ",
|
104 |
+
"diagonal_insight": "๋๊ฐ์ ํต์ฐฐ"
|
105 |
+
""",
|
106 |
+
|
107 |
+
"blending": """
|
108 |
+
"input_space1": "์ฒซ ๋ฒ์งธ ๊ฐ๋
",
|
109 |
+
"input_space2": "๋ ๋ฒ์งธ ๊ฐ๋
",
|
110 |
+
"generic_space": "๊ณตํต ๊ตฌ์กฐ",
|
111 |
+
"blended_space": "ํผํฉ๋ ์๋ก์ด ์๋ฏธ",
|
112 |
+
"emergent_properties": "์ฐฝ๋ฐ์ ์์ฑ๋ค",
|
113 |
+
"blend_ratio": "ํผํฉ ๋น์จ"
|
114 |
+
""",
|
115 |
+
|
116 |
+
"sound": """
|
117 |
+
"phonetic_analysis": "์์ฑ ๋ถ์",
|
118 |
+
"sound_meaning": "์ํฅ์ด ์ ๋ฌํ๋ ์๋ฏธ",
|
119 |
+
"vowel_consonant_ratio": "๋ชจ์/์์ ๋น์จ",
|
120 |
+
"phoneme_emotion_map": "์์-๊ฐ์ ๋งคํ",
|
121 |
+
"cross_linguistic_sound": "์ธ์ด๊ฐ ์ํฅ ์ผ๊ด์ฑ"
|
122 |
+
""",
|
123 |
+
|
124 |
+
"linguistic": """
|
125 |
+
"korean_adaptation": "ํ๊ตญ์ด ์ ์",
|
126 |
+
"english_meaning": "์์ด ์๋ฏธ",
|
127 |
+
"cultural_considerations": "๋ฌธํ์ ๊ณ ๋ ค์ฌํญ",
|
128 |
+
"avoid_meanings": "ํผํด์ผ ํ ์๋ฏธ๋ค",
|
129 |
+
"localization_strategy": "ํ์งํ ์ ๋ต"
|
130 |
+
""",
|
131 |
+
|
132 |
+
"archetype": """
|
133 |
+
"archetype": "์ ํ๋ ์ํ",
|
134 |
+
"archetype_traits": "์ํ์ ํน์ง๋ค",
|
135 |
+
"shadow_side": "๊ทธ๋ฆผ์ ์ธก๋ฉด",
|
136 |
+
"mythology_reference": "์ ํ์ ์ฐธ์กฐ",
|
137 |
+
"customer_journey": "๊ณ ๊ฐ ์ฌ์ ์ฐ๊ฒฐ"
|
138 |
+
""",
|
139 |
+
|
140 |
+
"jobs": """
|
141 |
+
"functional_job": "๊ธฐ๋ฅ์ ์ผ",
|
142 |
+
"emotional_job": "๊ฐ์ ์ ์ผ",
|
143 |
+
"social_job": "์ฌํ์ ์ผ",
|
144 |
+
"job_statement": "ํต์ฌ Job ๋ฌธ์ฅ",
|
145 |
+
"outcome_metrics": "์ฑ๊ณผ ์งํ"
|
146 |
+
""",
|
147 |
+
|
148 |
+
"scamper": """
|
149 |
+
"scamper_technique": "์ฌ์ฉ๋ ๊ธฐ๋ฒ",
|
150 |
+
"original_concept": "์๋ ๊ฐ๋
",
|
151 |
+
"transformation": "๋ณํ ๊ณผ์ ",
|
152 |
+
"innovation_type": "ํ์ ์ ํ",
|
153 |
+
"disruption_level": "ํ๊ดด์ ํ์ ์์ค"
|
154 |
+
""",
|
155 |
+
|
156 |
+
"design": """
|
157 |
+
"user_insight": "์ฌ์ฉ์ ํต์ฐฐ",
|
158 |
+
"pain_point": "ํด๊ฒฐํ๋ ๋ฌธ์ ์ ",
|
159 |
+
"desirability": "๋ฐ๋์งํจ (์ธ๊ฐ)",
|
160 |
+
"feasibility": "์คํ๊ฐ๋ฅ์ฑ (๊ธฐ์ )",
|
161 |
+
"viability": "์์กด๊ฐ๋ฅ์ฑ (๋น์ฆ๋์ค)"
|
162 |
+
""",
|
163 |
+
|
164 |
+
"biomimicry": """
|
165 |
+
"natural_inspiration": "์์ฐ์ ์๊ฐ์",
|
166 |
+
"biomimetic_principle": "์์ฒด๋ชจ๋ฐฉ ์๋ฆฌ",
|
167 |
+
"form_function": "ํํ์ ๊ธฐ๋ฅ",
|
168 |
+
"sustainability_aspect": "์ง์๊ฐ๋ฅ์ฑ ์ธก๋ฉด",
|
169 |
+
"adaptation_strategy": "์ ์ ์ ๋ต"
|
170 |
+
""",
|
171 |
+
|
172 |
+
"cognitive": """
|
173 |
+
"syllable_count": "์์ ์",
|
174 |
+
"processing_ease": "์ฒ๋ฆฌ ์ฉ์ด์ฑ ์ ์",
|
175 |
+
"memory_hooks": "๊ธฐ์ต ๊ณ ๋ฆฌ",
|
176 |
+
"cognitive_fluency": "์ธ์ง์ ์ ์ฐฝ์ฑ",
|
177 |
+
"attention_span_fit": "์ฃผ์๋ ฅ ์ ํฉ๋"
|
178 |
+
""",
|
179 |
+
|
180 |
+
"vonrestorff": """
|
181 |
+
"category_norm": "์นดํ
๊ณ ๋ฆฌ ํ์ค",
|
182 |
+
"deviation_strategy": "์ผํ ์ ๋ต",
|
183 |
+
"uniqueness_factors": "๋
ํน์ฑ ์์๋ค",
|
184 |
+
"attention_triggers": "์ฃผ์ ํธ๋ฆฌ๊ฑฐ",
|
185 |
+
"isolation_effect": "๊ณ ๋ฆฝ ํจ๊ณผ ํ์ฉ"
|
186 |
+
""",
|
187 |
+
|
188 |
+
"network": """
|
189 |
+
"network_type": "๋คํธ์ํฌ ์ ํ",
|
190 |
+
"viral_coefficient": "๋ฐ์ด๋ด ๊ณ์",
|
191 |
+
"sharing_ease": "๊ณต์ ์ฉ์ด์ฑ",
|
192 |
+
"community_aspect": "์ปค๋ฎค๋ํฐ ์ธก๋ฉด",
|
193 |
+
"network_value": "๋คํธ์ํฌ ๊ฐ์น"
|
194 |
+
""",
|
195 |
+
|
196 |
+
"memetics": """
|
197 |
+
"meme_structure": "๋ฐ ๊ตฌ์กฐ",
|
198 |
+
"replication_ease": "๋ณต์ ์ฉ์ด์ฑ",
|
199 |
+
"mutation_potential": "๋ณ์ด ์ ์ฌ๋ ฅ",
|
200 |
+
"cultural_fitness": "๋ฌธํ์ ์ ํฉ๋",
|
201 |
+
"transmission_channels": "์ ๋ฌ ์ฑ๋"
|
202 |
+
""",
|
203 |
+
|
204 |
+
"color": """
|
205 |
+
"color_palette": "์์ ํ๋ ํธ",
|
206 |
+
"emotional_response": "๊ฐ์ ์ ๋ฐ์",
|
207 |
+
"cultural_associations": "๋ฌธํ์ ์ฐ์",
|
208 |
+
"industry_alignment": "์
์ข
์ ๋ ฌ",
|
209 |
+
"color_accessibility": "์์ ์ ๊ทผ์ฑ"
|
210 |
+
""",
|
211 |
+
|
212 |
+
"gestalt": """
|
213 |
+
"gestalt_principle": "ํ์ฉ ์์น",
|
214 |
+
"visual_structure": "์๊ฐ์ ๊ตฌ์กฐ",
|
215 |
+
"perceptual_grouping": "์ง๊ฐ์ ๊ทธ๋ฃนํ",
|
216 |
+
"figure_ground": "์ ๊ฒฝ-๋ฐฐ๊ฒฝ ๊ด๊ณ",
|
217 |
+
"closure_effect": "ํ์ ํจ๊ณผ"
|
218 |
+
"""
|
219 |
}
|
220 |
|
221 |
+
def create_theory_prompt(theory: str) -> str:
|
222 |
+
"""๊ฐ ์ด๋ก ๋ณ ํต์ผ๋ ํ๋กฌํํธ ์์ฑ"""
|
223 |
+
theory_names = {
|
224 |
+
"square": "Square Theory",
|
225 |
+
"blending": "Conceptual Blending Theory",
|
226 |
+
"sound": "Sound Symbolism",
|
227 |
+
"linguistic": "Linguistic Relativity",
|
228 |
+
"archetype": "Jung์ Archetype Theory",
|
229 |
+
"jobs": "Jobs-to-be-Done Theory",
|
230 |
+
"scamper": "SCAMPER Method",
|
231 |
+
"design": "IDEO์ Design Thinking",
|
232 |
+
"biomimicry": "Biomimicry",
|
233 |
+
"cognitive": "Cognitive Load Theory",
|
234 |
+
"vonrestorff": "Von Restorff Effect",
|
235 |
+
"network": "Network Effects",
|
236 |
+
"memetics": "Memetics",
|
237 |
+
"color": "Color Psychology",
|
238 |
+
"gestalt": "Gestalt Theory"
|
239 |
+
}
|
240 |
+
|
241 |
+
return UNIFIED_BASE_PROMPT.format(
|
242 |
+
theory_name=theory_names[theory],
|
243 |
+
theory_description=THEORY_DESCRIPTIONS[theory],
|
244 |
+
theory_specific_fields=THEORY_SPECIFIC_FIELDS[theory]
|
245 |
+
)
|
246 |
|
247 |
def generate_by_theory(industry: str, keywords: str, theory: str, count: int = 3) -> Tuple[str, str]:
|
248 |
"""ํน์ ์ด๋ก ์ผ๋ก ๋ธ๋๋ ์์ฑ"""
|
|
|
250 |
if not industry or not keywords:
|
251 |
return "โ ๏ธ ์
์ข
๊ณผ ํค์๋๋ฅผ ์
๋ ฅํด์ฃผ์ธ์.", ""
|
252 |
|
253 |
+
prompt = create_theory_prompt(theory)
|
254 |
user_input = f"""์
์ข
: {industry}
|
255 |
ํค์๋: {keywords}
|
256 |
|
257 |
์ ์ ๋ณด๋ก {count}๊ฐ์ ๋ธ๋๋๋ฅผ ์์ฑํ์ธ์.
|
258 |
+
๊ฐ ๋ธ๋๋๋ ํต์ผ๋ ๊ตฌ์กฐ๋ฅผ ๊ฐ์ง๋, theory_specific ์น์
์๋ {theory} ์ด๋ก ์ ํน์ฑ์ ๋ฐ์ํ์ธ์."""
|
|
|
259 |
|
260 |
try:
|
261 |
response = client.chat.completions.create(
|
262 |
+
model="gpt-4o-mini",
|
263 |
messages=[
|
264 |
{"role": "system", "content": prompt},
|
265 |
{"role": "user", "content": user_input}
|
|
|
273 |
data = json.loads(content)
|
274 |
|
275 |
# ์๋ต ์ ๊ทํ
|
276 |
+
if "brands" in data:
|
277 |
+
results = data["brands"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
278 |
else:
|
279 |
+
results = [data]
|
280 |
|
281 |
if not isinstance(results, list):
|
282 |
results = [results]
|
283 |
|
284 |
# ๋งํฌ๋ค์ด ์์ฑ
|
285 |
+
markdown = generate_unified_markdown(theory, results, industry, keywords)
|
286 |
|
287 |
# HTML ์๊ฐํ ์์ฑ
|
288 |
+
html = generate_unified_visualization(theory, results)
|
289 |
|
290 |
return markdown, html
|
291 |
|
292 |
except Exception as e:
|
293 |
error_msg = f"โ {theory} ์ด๋ก ์ค๋ฅ: {str(e)}"
|
294 |
+
print(error_msg)
|
295 |
return error_msg, ""
|
296 |
|
297 |
+
def generate_unified_markdown(theory: str, results: List[Dict], industry: str, keywords: str) -> str:
|
298 |
+
"""ํต์ผ๋ ๋งํฌ๋ค์ด ์์ฑ"""
|
299 |
|
300 |
theory_names = {
|
301 |
"square": "Square Theory",
|
|
|
316 |
}
|
317 |
|
318 |
theory_icons = {
|
319 |
+
"square": "๐ฆ", "blending": "๐", "sound": "๐", "linguistic": "๐",
|
320 |
+
"archetype": "๐ญ", "jobs": "โ
", "scamper": "๐ง", "design": "๐ญ",
|
321 |
+
"biomimicry": "๐ฟ", "cognitive": "๐ง ", "vonrestorff": "โก", "network": "๐",
|
322 |
+
"memetics": "๐งฌ", "color": "๐จ", "gestalt": "๐๏ธ"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
323 |
}
|
324 |
|
325 |
markdown = f"""# {theory_icons[theory]} {theory_names[theory]}
|
|
|
336 |
"""
|
337 |
|
338 |
for idx, result in enumerate(results, 1):
|
339 |
+
core = result.get('core', {})
|
340 |
+
visual = result.get('visual', {})
|
341 |
+
linguistic = result.get('linguistic', {})
|
342 |
+
strategic = result.get('strategic', {})
|
343 |
+
theory_specific = result.get('theory_specific', {})
|
344 |
+
evaluation = result.get('evaluation', {})
|
345 |
+
|
346 |
+
brand_name = core.get('brand_name', 'N/A')
|
347 |
+
slogan = core.get('slogan', 'N/A')
|
348 |
|
349 |
markdown += f"\n## {idx}. {brand_name}\n"
|
350 |
markdown += f"**์ฌ๋ก๊ฑด**: *\"{slogan}\"*\n\n"
|
351 |
|
352 |
+
# ํต์ฌ ์ ๋ณด
|
353 |
+
markdown += f"""### ๐ ํต์ฌ ์ ๋ณด
|
354 |
+
- **ํต์ฌ ๊ฐ์น**: {core.get('core_value', 'N/A')}
|
355 |
+
- **๋ชฉํ ๊ฐ์ **: {core.get('target_emotion', 'N/A')}
|
356 |
+
- **๋ธ๋๋ ์ฑ๊ฒฉ**: {core.get('brand_personality', 'N/A')}
|
357 |
+
|
358 |
+
### ๐จ ์๊ฐ์ ์ปจ์
|
359 |
+
- **์ฃผ์ ์์**: {visual.get('primary_color', '#000000')} - {visual.get('color_meaning', 'N/A')}
|
360 |
+
- **๋น์ฃผ์ผ ์ปจ๏ฟฝ๏ฟฝ**: {visual.get('visual_concept', 'N/A')}
|
361 |
+
- **ํ์ดํฌ๊ทธ๋ํผ**: {visual.get('typography_style', 'N/A')}
|
362 |
+
|
363 |
+
### ๐ฃ๏ธ ์ธ์ด์ ํน์ฑ
|
364 |
+
- **๋ฐ์**: {linguistic.get('pronunciation', 'N/A')}
|
365 |
+
- **์ด์/๊ตฌ์ฑ**: {linguistic.get('etymology', 'N/A')}
|
366 |
+
- **๊ธ๋ก๋ฒ ์ ์์ฑ**: {linguistic.get('global_adaptability', 'N/A')}
|
367 |
+
|
368 |
+
### ๐ฏ ์ ๋ต์ ๊ฐ์น
|
369 |
+
- **์ฐจ๋ณํ ํฌ์ธํธ**: {strategic.get('differentiation', 'N/A')}
|
370 |
+
- **์์ฅ ํฌ์ง์
๋**: {strategic.get('market_positioning', 'N/A')}
|
371 |
+
- **์ฑ์ฅ ์ ์ฌ๋ ฅ**: {strategic.get('growth_potential', 'N/A')}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
372 |
"""
|
373 |
|
374 |
+
# ์ด๋ก ๋ณ ํน์ ์ ๋ณด
|
375 |
+
if theory_specific:
|
376 |
+
markdown += f"\n### ๐ก {theory_names[theory]} ํน์ฑ\n"
|
377 |
+
for key, value in theory_specific.items():
|
378 |
+
# ํค๋ฅผ ์ฝ๊ธฐ ์ฌ์ด ํํ๋ก ๋ณํ
|
379 |
+
display_key = key.replace('_', ' ').title()
|
380 |
+
markdown += f"- **{display_key}**: {value}\n"
|
381 |
+
|
382 |
+
# ํ๊ฐ ์ ์
|
383 |
+
markdown += f"""
|
384 |
+
### ๐ ํ๊ฐ
|
385 |
+
- **์ฐฝ์์ฑ**: {'โญ' * int(evaluation.get('creativity_score', 0))} ({evaluation.get('creativity_score', 0)}/10)
|
386 |
+
- **๊ธฐ์ต์ฑ**: {'โญ' * int(evaluation.get('memorability_score', 0))} ({evaluation.get('memorability_score', 0)}/10)
|
387 |
+
- **๊ด๋ จ์ฑ**: {'โญ' * int(evaluation.get('relevance_score', 0))} ({evaluation.get('relevance_score', 0)}/10)
|
388 |
+
|
389 |
+
๐ฌ **์ ์ฒด ํ๊ฐ**: {evaluation.get('overall_effectiveness', 'N/A')}
|
390 |
+
"""
|
391 |
|
392 |
markdown += "\n---\n"
|
393 |
|
394 |
return markdown
|
395 |
|
396 |
+
def generate_unified_visualization(theory: str, results: List[Dict]) -> str:
|
397 |
+
"""ํต์ผ๋ ์๊ฐํ ์์ฑ"""
|
398 |
|
399 |
html_parts = []
|
400 |
|
401 |
for idx, result in enumerate(results, 1):
|
402 |
+
core = result.get('core', {})
|
403 |
+
visual = result.get('visual', {})
|
404 |
+
linguistic = result.get('linguistic', {})
|
405 |
+
strategic = result.get('strategic', {})
|
406 |
+
theory_specific = result.get('theory_specific', {})
|
407 |
+
evaluation = result.get('evaluation', {})
|
408 |
+
|
409 |
+
brand_name = core.get('brand_name', 'Brand')
|
410 |
+
slogan = core.get('slogan', '')
|
411 |
+
primary_color = visual.get('primary_color', '#667eea')
|
412 |
+
|
413 |
+
# ํต์ผ๋ ์นด๋ ๋ ์ด์์
|
414 |
+
html = f"""
|
415 |
+
<div style="max-width: 800px; margin: 30px auto; font-family: -apple-system, sans-serif;">
|
416 |
+
<div style="background: white; border-radius: 20px; box-shadow: 0 10px 40px rgba(0,0,0,0.1); overflow: hidden;">
|
417 |
+
<!-- ํค๋ -->
|
418 |
+
<div style="background: linear-gradient(135deg, {primary_color} 0%, #2c3e50 100%); padding: 40px; color: white;">
|
419 |
+
<h2 style="margin: 0 0 10px 0; font-size: 2.5em;">{brand_name}</h2>
|
420 |
+
<p style="margin: 0; font-style: italic; font-size: 1.2em; opacity: 0.9;">"{slogan}"</p>
|
421 |
+
</div>
|
422 |
+
|
423 |
+
<!-- ๋ณธ๋ฌธ -->
|
424 |
+
<div style="padding: 40px;">
|
425 |
+
<!-- ํ๊ฐ ์ ์ -->
|
426 |
+
<div style="display: flex; justify-content: space-around; margin-bottom: 30px;">
|
427 |
+
<div style="text-align: center;">
|
428 |
+
<div style="font-size: 2em; color: {primary_color}; font-weight: bold;">
|
429 |
+
{evaluation.get('creativity_score', 0)}/10
|
430 |
+
</div>
|
431 |
+
<div style="color: #7f8c8d; margin-top: 5px;">์ฐฝ์์ฑ</div>
|
432 |
+
</div>
|
433 |
+
<div style="text-align: center;">
|
434 |
+
<div style="font-size: 2em; color: {primary_color}; font-weight: bold;">
|
435 |
+
{evaluation.get('memorability_score', 0)}/10
|
436 |
+
</div>
|
437 |
+
<div style="color: #7f8c8d; margin-top: 5px;">๊ธฐ์ต์ฑ</div>
|
438 |
+
</div>
|
439 |
+
<div style="text-align: center;">
|
440 |
+
<div style="font-size: 2em; color: {primary_color}; font-weight: bold;">
|
441 |
+
{evaluation.get('relevance_score', 0)}/10
|
442 |
+
</div>
|
443 |
+
<div style="color: #7f8c8d; margin-top: 5px;">๊ด๋ จ์ฑ</div>
|
444 |
+
</div>
|
445 |
+
</div>
|
446 |
+
|
447 |
+
<!-- ํต์ฌ ์ ๋ณด ๊ทธ๋ฆฌ๋ -->
|
448 |
+
<div style="display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-bottom: 30px;">
|
449 |
+
<div style="background: #f8f9fa; padding: 20px; border-radius: 10px;">
|
450 |
+
<h4 style="margin: 0 0 10px 0; color: {primary_color};">ํต์ฌ ๊ฐ์น</h4>
|
451 |
+
<p style="margin: 0; color: #555;">{core.get('core_value', 'N/A')}</p>
|
452 |
+
</div>
|
453 |
+
<div style="background: #f8f9fa; padding: 20px; border-radius: 10px;">
|
454 |
+
<h4 style="margin: 0 0 10px 0; color: {primary_color};">๋ชฉํ ๊ฐ์ </h4>
|
455 |
+
<p style="margin: 0; color: #555;">{core.get('target_emotion', 'N/A')}</p>
|
456 |
+
</div>
|
457 |
+
<div style="background: #f8f9fa; padding: 20px; border-radius: 10px;">
|
458 |
+
<h4 style="margin: 0 0 10px 0; color: {primary_color};">์ฐจ๋ณํ ํฌ์ธํธ</h4>
|
459 |
+
<p style="margin: 0; color: #555;">{strategic.get('differentiation', 'N/A')}</p>
|
460 |
+
</div>
|
461 |
+
<div style="background: #f8f9fa; padding: 20px; border-radius: 10px;">
|
462 |
+
<h4 style="margin: 0 0 10px 0; color: {primary_color};">๋ฐ์ ๊ฐ์ด๋</h4>
|
463 |
+
<p style="margin: 0; color: #555;">{linguistic.get('pronunciation', 'N/A')}</p>
|
464 |
+
</div>
|
465 |
+
</div>
|
466 |
+
"""
|
467 |
+
|
468 |
+
# ์ด๋ก ๋ณ ํน์ ์๊ฐํ ์ถ๊ฐ
|
469 |
+
if theory == "square" and all(k in theory_specific for k in ['tl', 'tr', 'bl', 'br']):
|
470 |
+
html += visualize_square_specific(theory_specific, primary_color)
|
471 |
+
elif theory == "blending" and 'input_space1' in theory_specific:
|
472 |
+
html += visualize_blending_specific(theory_specific, primary_color)
|
473 |
+
elif theory == "color" and 'color_palette' in theory_specific:
|
474 |
+
html += visualize_color_specific(theory_specific, primary_color)
|
475 |
else:
|
476 |
+
# ๊ธฐ๋ณธ ์ด๋ก ํน์ฑ ํ์
|
477 |
+
html += f"""
|
478 |
+
<div style="background: linear-gradient(135deg, {primary_color}15 0%, {primary_color}05 100%); padding: 25px; border-radius: 15px; margin-top: 20px;">
|
479 |
+
<h4 style="margin: 0 0 15px 0; color: {primary_color};">์ด๋ก ํน์ฑ</h4>
|
480 |
+
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px;">
|
481 |
+
"""
|
482 |
+
for key, value in theory_specific.items():
|
483 |
+
display_key = key.replace('_', ' ').title()
|
484 |
+
html += f"""
|
485 |
+
<div>
|
486 |
+
<strong style="color: #555;">{display_key}:</strong><br>
|
487 |
+
<span style="color: #777;">{value}</span>
|
488 |
+
</div>
|
489 |
+
"""
|
490 |
+
html += """
|
491 |
+
</div>
|
492 |
+
</div>
|
493 |
+
"""
|
494 |
+
|
495 |
+
# ์ ์ฒด ํ๊ฐ
|
496 |
+
html += f"""
|
497 |
+
<div style="background: #f8f9fa; padding: 20px; border-radius: 10px; margin-top: 20px;">
|
498 |
+
<h4 style="margin: 0 0 10px 0; color: {primary_color};">์ ์ฒด ํ๊ฐ</h4>
|
499 |
+
<p style="margin: 0; color: #555; line-height: 1.6;">{evaluation.get('overall_effectiveness', 'N/A')}</p>
|
500 |
+
</div>
|
501 |
+
</div>
|
502 |
+
</div>
|
503 |
+
</div>
|
504 |
+
"""
|
505 |
+
|
506 |
+
html_parts.append(html)
|
507 |
|
508 |
return "\n".join(html_parts)
|
509 |
|
510 |
+
def visualize_square_specific(theory_specific: Dict, primary_color: str) -> str:
|
511 |
+
"""Square Theory ํน์ ์๊ฐํ"""
|
|
|
512 |
return f"""
|
513 |
+
<div style="background: #f8f9fa; padding: 30px; border-radius: 15px; margin-top: 20px;">
|
514 |
+
<h4 style="margin: 0 0 20px 0; color: {primary_color}; text-align: center;">Square ๊ตฌ์กฐ</h4>
|
515 |
+
<div style="position: relative; width: 100%; max-width: 400px; height: 300px; margin: 0 auto;">
|
516 |
+
<div style="position: absolute; top: 0; left: 0; background: white; color: {primary_color}; padding: 15px 20px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); font-weight: bold;">
|
517 |
+
{theory_specific.get('tl', '?')}
|
|
|
|
|
|
|
|
|
518 |
</div>
|
519 |
+
<div style="position: absolute; top: 0; right: 0; background: white; color: {primary_color}; padding: 15px 20px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); font-weight: bold;">
|
520 |
+
{theory_specific.get('tr', '?')}
|
521 |
</div>
|
522 |
+
<div style="position: absolute; bottom: 0; left: 0; background: white; color: {primary_color}; padding: 15px 20px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); font-weight: bold;">
|
523 |
+
{theory_specific.get('bl', '?')}
|
524 |
</div>
|
525 |
+
<div style="position: absolute; bottom: 0; right: 0; background: white; color: {primary_color}; padding: 15px 20px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); font-weight: bold;">
|
526 |
+
{theory_specific.get('br', '?')}
|
527 |
</div>
|
528 |
|
529 |
+
<!-- ์ฐ๊ฒฐ์ ๊ณผ ๊ด๊ณ ํ์ -->
|
530 |
+
<div style="position: absolute; top: 25px; left: 50%; transform: translateX(-50%); color: #7f8c8d; font-size: 0.9em;">
|
531 |
+
{theory_specific.get('top_edge', '')}
|
532 |
+
</div>
|
533 |
+
<div style="position: absolute; bottom: 25px; left: 50%; transform: translateX(-50%); color: #7f8c8d; font-size: 0.9em;">
|
534 |
+
{theory_specific.get('bottom_edge', '')}
|
535 |
+
</div>
|
536 |
+
<div style="position: absolute; top: 50%; left: 25px; transform: translateY(-50%) rotate(-90deg); color: #7f8c8d; font-size: 0.9em;">
|
537 |
+
{theory_specific.get('left_edge', '')}
|
538 |
+
</div>
|
539 |
+
<div style="position: absolute; top: 50%; right: 25px; transform: translateY(-50%) rotate(90deg); color: #7f8c8d; font-size: 0.9em;">
|
540 |
+
{theory_specific.get('right_edge', '')}
|
541 |
</div>
|
542 |
</div>
|
543 |
</div>
|
|
|
544 |
"""
|
545 |
|
546 |
+
def visualize_blending_specific(theory_specific: Dict, primary_color: str) -> str:
|
547 |
+
"""Conceptual Blending ํน์ ์๊ฐํ"""
|
|
|
|
|
|
|
|
|
|
|
|
|
548 |
return f"""
|
549 |
+
<div style="background: #f8f9fa; padding: 30px; border-radius: 15px; margin-top: 20px;">
|
550 |
+
<h4 style="margin: 0 0 20px 0; color: {primary_color}; text-align: center;">๊ฐ๋
ํผํฉ</h4>
|
551 |
+
<div style="display: flex; justify-content: center; align-items: center; gap: 20px; flex-wrap: wrap;">
|
552 |
+
<div style="text-align: center; padding: 20px; background: white; color: {primary_color}; border-radius: 50%; width: 120px; height: 120px; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 10px rgba(0,0,0,0.1);">
|
|
|
|
|
553 |
<div>
|
554 |
<strong>Input 1</strong><br>
|
555 |
+
<span style="font-size: 0.9em;">{theory_specific.get('input_space1', '')}</span>
|
556 |
</div>
|
557 |
</div>
|
558 |
|
559 |
+
<div style="font-size: 2em; color: {primary_color};">+</div>
|
560 |
|
561 |
+
<div style="text-align: center; padding: 20px; background: white; color: {primary_color}; border-radius: 50%; width: 120px; height: 120px; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 10px rgba(0,0,0,0.1);">
|
562 |
<div>
|
563 |
<strong>Input 2</strong><br>
|
564 |
+
<span style="font-size: 0.9em;">{theory_specific.get('input_space2', '')}</span>
|
565 |
</div>
|
566 |
</div>
|
567 |
|
568 |
+
<div style="font-size: 2em; color: {primary_color};">=</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
569 |
|
570 |
+
<div style="text-align: center; padding: 20px; background: {primary_color}; color: white; border-radius: 20px; min-width: 150px; box-shadow: 0 2px 10px rgba(0,0,0,0.1);">
|
571 |
+
<strong>Blend</strong><br>
|
572 |
+
<span style="font-size: 0.95em;">{theory_specific.get('blended_space', '')}</span>
|
573 |
</div>
|
574 |
</div>
|
|
|
|
|
|
|
|
|
575 |
</div>
|
|
|
576 |
"""
|
577 |
|
578 |
+
def visualize_color_specific(theory_specific: Dict, primary_color: str) -> str:
|
579 |
+
"""Color Psychology ํน์ ์๊ฐํ"""
|
580 |
+
palette = theory_specific.get('color_palette', primary_color)
|
581 |
+
colors = palette.split(',') if ',' in palette else [primary_color]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
582 |
|
583 |
+
html = f"""
|
584 |
+
<div style="background: #f8f9fa; padding: 30px; border-radius: 15px; margin-top: 20px;">
|
585 |
+
<h4 style="margin: 0 0 20px 0; color: {primary_color}; text-align: center;">์์ ํ๋ ํธ</h4>
|
586 |
+
<div style="display: flex; justify-content: center; gap: 10px; flex-wrap: wrap;">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
587 |
"""
|
|
|
|
|
|
|
|
|
588 |
|
589 |
+
for color in colors[:5]: # ์ต๋ 5๊ฐ ์์๋ง ํ์
|
590 |
+
color = color.strip()
|
591 |
+
html += f"""
|
592 |
+
<div style="width: 80px; height: 80px; background: {color}; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,0.1);"></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
593 |
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
594 |
|
595 |
+
html += """
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
596 |
</div>
|
597 |
</div>
|
|
|
598 |
"""
|
599 |
return html
|
600 |
|
601 |
# Gradio UI
|
602 |
with gr.Blocks(
|
603 |
+
title="Ultimate Brand Theory Generator - Unified",
|
604 |
theme=gr.themes.Soft(),
|
605 |
css="""
|
606 |
.gradio-container {
|
|
|
617 |
<h1 style="font-size: 2.5em; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 10px;">
|
618 |
๐ Ultimate Brand Theory Generator
|
619 |
</h1>
|
620 |
+
<p style="font-size: 1.2em; color: #7f8c8d;">15๊ฐ ์ด๋ก ์ ํ์ฉํ ์ข
ํฉ ๋ธ๋๋ ์์ฑ๊ธฐ (ํต์ผ๋ ์ถ๋ ฅ ๊ตฌ์กฐ)</p>
|
621 |
</div>
|
622 |
""")
|
623 |
|
|
|
644 |
|
645 |
gr.Markdown("""
|
646 |
<div style="background: #e3f2fd; padding: 15px; border-radius: 8px; margin-top: 20px;">
|
647 |
+
<h4 style="margin-top: 0; color: #1976d2;">๐ ํต์ผ๋ ์ถ๋ ฅ ๊ตฌ์กฐ</h4>
|
648 |
+
<p style="margin: 10px 0;">๋ชจ๋ ์ด๋ก ์์ ๋์ผํ ๊ตฌ์กฐ๋ก ๊ฒฐ๊ณผ๋ฅผ ์ ๊ณตํฉ๋๋ค:</p>
|
649 |
+
<ul style="margin: 5px 0; padding-left: 20px;">
|
650 |
+
<li><strong>ํต์ฌ ์ ๋ณด</strong>: ๋ธ๋๋๋ช
, ์ฌ๋ก๊ฑด, ๊ฐ์น, ์ฑ๊ฒฉ</li>
|
651 |
+
<li><strong>์๊ฐ์ ์์</strong>: ์์, ๋น์ฃผ์ผ ์ปจ์
</li>
|
652 |
+
<li><strong>์ธ์ด์ ํน์ฑ</strong>: ๋ฐ์, ๊ธ๋ก๋ฒ ์ ์์ฑ</li>
|
653 |
+
<li><strong>์ ๋ต์ ๊ฐ์น</strong>: ์ฐจ๋ณํ, ํฌ์ง์
๋</li>
|
654 |
+
<li><strong>์ด๋ก ๋ณ ํน์ฑ</strong>: ๊ฐ ์ด๋ก ์ ๊ณ ์ ์์</li>
|
655 |
+
<li><strong>ํ๊ฐ ์ ์</strong>: ์ฐฝ์์ฑ, ๊ธฐ์ต์ฑ, ๊ด๋ จ์ฑ</li>
|
656 |
+
</ul>
|
657 |
</div>
|
658 |
""")
|
659 |
|
660 |
with gr.Column(scale=3):
|
661 |
# 15๊ฐ ํญ ์์ฑ
|
662 |
with gr.Tabs():
|
663 |
+
# ๊ฐ ์ด๋ก ๋ณ ํญ (์์๋ก ๋ช ๊ฐ๋ง ํ์)
|
664 |
+
theories = [
|
665 |
+
("๐ฆ Square Theory", "square"),
|
666 |
+
("๐ Conceptual Blending", "blending"),
|
667 |
+
("๐ Sound Symbolism", "sound"),
|
668 |
+
("๐ Linguistic Relativity", "linguistic"),
|
669 |
+
("๐ญ Archetype Theory", "archetype"),
|
670 |
+
("โ
Jobs-to-be-Done", "jobs"),
|
671 |
+
("๐ง SCAMPER Method", "scamper"),
|
672 |
+
("๐ญ Design Thinking", "design"),
|
673 |
+
("๐ฟ Biomimicry", "biomimicry"),
|
674 |
+
("๐ง Cognitive Load", "cognitive"),
|
675 |
+
("โก Von Restorff Effect", "vonrestorff"),
|
676 |
+
("๐ Network Effects", "network"),
|
677 |
+
("๐งฌ Memetics", "memetics"),
|
678 |
+
("๐จ Color Psychology", "color"),
|
679 |
+
("๐๏ธ Gestalt Principles", "gestalt")
|
680 |
+
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
681 |
|
682 |
+
for tab_name, theory_key in theories:
|
683 |
+
with gr.Tab(tab_name):
|
684 |
+
with gr.Row():
|
685 |
+
btn = gr.Button(f"{tab_name}๋ก ์์ฑ", variant="primary", size="sm")
|
686 |
+
output = gr.Markdown()
|
687 |
+
visual = gr.HTML()
|
688 |
+
|
689 |
+
btn.click(
|
690 |
+
lambda i, k, t=theory_key: generate_by_theory(i, k, t),
|
691 |
+
inputs=[industry_input, keywords_input],
|
692 |
+
outputs=[output, visual]
|
693 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
694 |
|
695 |
gr.Markdown("""
|
696 |
<div style="background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 30px; border-radius: 15px; margin-top: 40px;">
|
697 |
+
<h3 style="margin-top: 0;">๐ ํต์ผ๋ ํ๊ฐ ์์คํ
</h3>
|
698 |
+
<p style="margin: 15px 0;">๋ชจ๋ ๋ธ๋๋๋ ๋ค์ 3๊ฐ์ง ๊ธฐ์ค์ผ๋ก ํ๊ฐ๋ฉ๋๋ค:</p>
|
699 |
+
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px;">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
700 |
<div>
|
701 |
+
<h4>์ฐฝ์์ฑ (Creativity)</h4>
|
702 |
+
<p style="margin: 5px 0;">๋
์ฐฝ์ฑ๊ณผ ํ์ ์ฑ์ ์ ๋</p>
|
703 |
</div>
|
704 |
<div>
|
705 |
+
<h4>๊ธฐ์ต์ฑ (Memorability)</h4>
|
706 |
+
<p style="margin: 5px 0;">์ฝ๊ฒ ๊ธฐ์ต๋๊ณ ํ์๋๋ ์ ๋</p>
|
707 |
</div>
|
708 |
<div>
|
709 |
+
<h4>๊ด๋ จ์ฑ (Relevance)</h4>
|
710 |
+
<p style="margin: 5px 0;">์
์ข
๊ณผ ํค์๋์์ ์ฐ๊ด์ฑ</p>
|
711 |
</div>
|
712 |
</div>
|
713 |
</div>
|