Spaces:
Sleeping
Sleeping
haepa_mac commited on
Commit ยท
3264298
1
Parent(s): e3b3552
๐ค AI ๊ธฐ๋ฐ ๋ชจ์์ ํน์ฑ ์์ฑ ์์คํ ๊ตฌ์ถ - ์ฌ๋ฌผ ํน์ฑ๊ณผ ์ฌ์ฉ์ ์กฐ์ ๊ฐ ๋ฐ์ํ๋ ์ฐฝ์์ ๋ชจ์ ์์ฑ, ๋งํฌ์ ํ๋ ํจํด ๊ตฌ์ฒดํ, ํด๋ฐฑ ์์คํ ์๋น
Browse files- modules/persona_generator.py +198 -19
- test_contradiction_ai.py +130 -0
- test_contradiction_extreme.py +134 -0
modules/persona_generator.py
CHANGED
|
@@ -749,25 +749,197 @@ class PersonalityProfile:
|
|
| 749 |
# ํด๋ฐฑ: ์ฑ๊ฒฉ ๊ธฐ๋ฐ ์ ํ
|
| 750 |
return random.sample(fallback_flaws, 4)
|
| 751 |
|
| 752 |
-
def generate_contradictions(self):
|
| 753 |
-
"""๋ชจ์์ ํน์ฑ
|
| 754 |
contradiction_vars = {k: v for k, v in self.variables.items() if k.startswith("P0")}
|
| 755 |
-
top_contradictions = sorted(contradiction_vars.items(), key=lambda x: x[1], reverse=True)[:
|
| 756 |
-
|
| 757 |
-
|
| 758 |
-
|
| 759 |
-
"
|
| 760 |
-
"
|
| 761 |
-
|
| 762 |
-
|
| 763 |
-
|
| 764 |
-
|
| 765 |
-
|
| 766 |
-
"
|
| 767 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 768 |
}
|
| 769 |
|
| 770 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 771 |
|
| 772 |
class HumorMatrix:
|
| 773 |
"""
|
|
@@ -1422,8 +1594,8 @@ class PersonaGenerator:
|
|
| 1422 |
# ๐ญ PersonalityProfile์์ ๋งค๋ ฅ์ ๊ฒฐํจ ๋์ ์์ฑ (์ด๋ฏธ์ง ๋ถ์๊ณผ ์ฑ๊ฒฉ ํน์ฑ ์ ๋ฌ)
|
| 1423 |
attractive_flaws = personality_profile.generate_attractive_flaws(image_analysis, personality_traits)
|
| 1424 |
|
| 1425 |
-
# ๐ PersonalityProfile์์ ๋ชจ์์ ํน์ฑ ๋์ ์์ฑ
|
| 1426 |
-
contradictions = personality_profile.generate_contradictions()
|
| 1427 |
|
| 1428 |
# ๐ช HumorMatrix ์์ฑ ๋ฐ ํ์ฉ
|
| 1429 |
humor_matrix = HumorMatrix()
|
|
@@ -2129,7 +2301,14 @@ class PersonaGenerator:
|
|
| 2129 |
attractive_flaws = personality_profile.generate_attractive_flaws()
|
| 2130 |
else:
|
| 2131 |
attractive_flaws = frontend_persona["๋งค๋ ฅ์ ๊ฒฐํจ"]
|
| 2132 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2133 |
|
| 2134 |
# ์ด๋ฏธ ์์ฑ๋ ์ํต๋ฐฉ์ ํ์ฉ
|
| 2135 |
communication_style = frontend_persona.get("์ํต๋ฐฉ์", self._generate_communication_style_from_profile(personality_profile))
|
|
|
|
| 749 |
# ํด๋ฐฑ: ์ฑ๊ฒฉ ๊ธฐ๋ฐ ์ ํ
|
| 750 |
return random.sample(fallback_flaws, 4)
|
| 751 |
|
| 752 |
+
def generate_contradictions(self, object_analysis=None, personality_traits=None):
|
| 753 |
+
"""AI ๊ธฐ๋ฐ ๋ชจ์์ ํน์ฑ ์์ฑ - ์ฌ๋ฌผ๊ณผ ์ฑ๊ฒฉ์ ๋ถ์ํ์ฌ ๋งํฌ๊น์ง ๋๋ฌ๋๋ ๋
์ฐฝ์ ๋ชจ์ ์์ฑ"""
|
| 754 |
contradiction_vars = {k: v for k, v in self.variables.items() if k.startswith("P0")}
|
| 755 |
+
top_contradictions = sorted(contradiction_vars.items(), key=lambda x: x[1], reverse=True)[:3]
|
| 756 |
+
|
| 757 |
+
# ๊ธฐ๋ณธ ๋ชจ์ (AI ์์ฑ ์คํจ ์ ํด๋ฐฑ)
|
| 758 |
+
fallback_contradictions = [
|
| 759 |
+
"๊ฒ์ผ๋ก๋ ๋์ ํด ๋ณด์ด์ง๋ง, ์์ ๋ฐ๋ปํ ๋ง์์ ๊ฐ์ง",
|
| 760 |
+
"๋
ผ๋ฆฌ์ ์ด๋ฉด์๋ ์ง๊ฐ์ ์์กดํ๋ ์ด์ค์ ๋ฉด๋ชจ"
|
| 761 |
+
]
|
| 762 |
+
|
| 763 |
+
# AI ๊ธฐ๋ฐ ๋์ ๋ชจ์ ์์ฑ ์๋
|
| 764 |
+
try:
|
| 765 |
+
# ์ฌ๋ฌผ ๋ถ์ ์ ๋ณด ์ถ์ถ
|
| 766 |
+
object_type = object_analysis.get("object_type", "์ ์ ์๋ ์ฌ๋ฌผ") if object_analysis else "์ฌ๋ฌผ"
|
| 767 |
+
materials = object_analysis.get("materials", ["์ ์ ์๋ ์ฌ์ง"]) if object_analysis else ["์ฌ์ง"]
|
| 768 |
+
material = materials[0] if materials else "์ ์ ์๋ ์ฌ์ง"
|
| 769 |
+
size = object_analysis.get("size", "") if object_analysis else ""
|
| 770 |
+
condition = object_analysis.get("condition", "") if object_analysis else ""
|
| 771 |
+
|
| 772 |
+
# ์ฑ๊ฒฉ ํน์ฑ ์ถ์ถ (์ฌ์ฉ์ ์กฐ์ ๊ฐ ๋ฐ์)
|
| 773 |
+
warmth = personality_traits.get("์จ๊ธฐ", 50) if personality_traits else 50
|
| 774 |
+
competence = personality_traits.get("๋ฅ๋ ฅ", 50) if personality_traits else 50
|
| 775 |
+
extraversion = personality_traits.get("์ธํฅ์ฑ", 50) if personality_traits else 50
|
| 776 |
+
humor = personality_traits.get("์ ๋จธ๊ฐ๊ฐ", 75) if personality_traits else 75
|
| 777 |
+
|
| 778 |
+
# ์ฃผ์ ๋ชจ์ ๊ฒฝํฅ ๋ถ์
|
| 779 |
+
contradiction_tendencies = []
|
| 780 |
+
for contra_var, value in top_contradictions:
|
| 781 |
+
if value > 60:
|
| 782 |
+
if "์ธ๋ฉด๋ด๋ฉด" in contra_var:
|
| 783 |
+
contradiction_tendencies.append("๊ฒ๊ณผ ์์ด ๋ค๋ฆ")
|
| 784 |
+
elif "์ํฉ๋ณ" in contra_var:
|
| 785 |
+
contradiction_tendencies.append("์ํฉ์ ๋ฐ๋ผ ๋ณํจ")
|
| 786 |
+
elif "์๊ฐ๋๋ณ" in contra_var:
|
| 787 |
+
contradiction_tendencies.append("์๊ฐ๋๋ณ ์ฑ๊ฒฉ ๋ณํ")
|
| 788 |
+
elif "๋
ผ๋ฆฌ๊ฐ์ " in contra_var:
|
| 789 |
+
contradiction_tendencies.append("๋
ผ๋ฆฌ์ ๊ฐ์ ์ ๋๋ฆฝ")
|
| 790 |
+
elif "๋
๋ฆฝ์์กด" in contra_var:
|
| 791 |
+
contradiction_tendencies.append("๋
๋ฆฝ์ฑ๊ณผ ์์กด์ฑ์ ๊ณต์กด")
|
| 792 |
+
elif "ํ๋์ ์ " in contra_var:
|
| 793 |
+
contradiction_tendencies.append("ํ๋์ ์ด๋ฉด์ ์ ์ ")
|
| 794 |
+
|
| 795 |
+
# ์ฑ๊ฒฉ ๊ทน๋จ๊ฐ ๋ถ์ (์ฌ์ฉ์ ์กฐ์ ๋ฐ์)
|
| 796 |
+
personality_extremes = []
|
| 797 |
+
if warmth >= 80:
|
| 798 |
+
personality_extremes.append("๋งค์ฐ ๋ฐ๋ปํจ")
|
| 799 |
+
elif warmth <= 20:
|
| 800 |
+
personality_extremes.append("๋งค์ฐ ์ฐจ๊ฐ์")
|
| 801 |
+
|
| 802 |
+
if competence >= 80:
|
| 803 |
+
personality_extremes.append("๋งค์ฐ ์ ๋ฅํจ")
|
| 804 |
+
elif competence <= 20:
|
| 805 |
+
personality_extremes.append("๋งค์ฐ ์ํผ")
|
| 806 |
+
|
| 807 |
+
if extraversion >= 80:
|
| 808 |
+
personality_extremes.append("๋งค์ฐ ์ธํฅ์ ")
|
| 809 |
+
elif extraversion <= 20:
|
| 810 |
+
personality_extremes.append("๋งค์ฐ ๋ดํฅ์ ")
|
| 811 |
+
|
| 812 |
+
# AI ํ๋กฌํํธ ์์ฑ
|
| 813 |
+
ai_prompt = f"""
|
| 814 |
+
๋ค์ ์ ๋ณด๋ฅผ ๋ฐํ์ผ๋ก ๋งค๋ ฅ์ ์ด๊ณ ๊ฐ์ฑ ์๋ '๋ชจ์์ ํน์ฑ' 2๊ฐ๋ฅผ ์์ฑํด์ฃผ์ธ์.
|
| 815 |
+
|
| 816 |
+
**์ฌ๋ฌผ ์ ๋ณด:**
|
| 817 |
+
- ์ ํ: {object_type}
|
| 818 |
+
- ์ฌ์ง: {material}
|
| 819 |
+
- ํฌ๊ธฐ: {size}
|
| 820 |
+
- ์ํ: {condition}
|
| 821 |
+
|
| 822 |
+
**์ฑ๊ฒฉ ํน์ฑ (์ฌ์ฉ์ ์กฐ์ ๊ฐ):**
|
| 823 |
+
- ์จ๊ธฐ: {warmth}/100 ({'๋งค์ฐ ๋ฐ๋ปํจ' if warmth >= 80 else '๋งค์ฐ ์ฐจ๊ฐ์' if warmth <= 20 else '๋ฐ๋ปํจ' if warmth >= 60 else '์ฐจ๊ฐ์' if warmth <= 40 else '๋ณดํต'})
|
| 824 |
+
- ๋ฅ๋ ฅ: {competence}/100 ({'๋งค์ฐ ์ ๋ฅํจ' if competence >= 80 else '๋งค์ฐ ์ํผ' if competence <= 20 else '์ ๋ฅํจ' if competence >= 60 else '์ํผ' if competence <= 40 else '๋ณดํต'})
|
| 825 |
+
- ์ธํฅ์ฑ: {extraversion}/100 ({'๋งค์ฐ ํ๋ฐํจ' if extraversion >= 80 else '๋งค์ฐ ์กฐ์ฉํจ' if extraversion <= 20 else 'ํ๋ฐํจ' if extraversion >= 60 else '์กฐ์ฉํจ' if extraversion <= 40 else '๋ณดํต'})
|
| 826 |
+
|
| 827 |
+
**๋ชจ์ ๊ฒฝํฅ:** {', '.join(contradiction_tendencies) if contradiction_tendencies else '์ผ๋ฐ์ '}
|
| 828 |
+
**์ฑ๊ฒฉ ๊ทน๋จ:** {', '.join(personality_extremes) if personality_extremes else '๊ท ํ์ '}
|
| 829 |
+
|
| 830 |
+
**์์ฑ ๊ฐ์ด๋๋ผ์ธ:**
|
| 831 |
+
1. ์ฌ๋ฌผ์ ๋ฌผ๋ฆฌ์ ํน์ฑ๊ณผ ์ฑ๊ฒฉ์ ๋ชจ์์ ์ฐฝ์์ ์ผ๋ก ์กฐํฉํ์ธ์
|
| 832 |
+
2. ์ฌ์ฉ์๊ฐ ์กฐ์ ํ ์ฑ๊ฒฉ ์์น๊ฐ ๋ช
ํํ ๋๋ฌ๋๋๋ก ํ์ธ์
|
| 833 |
+
3. ๋งํฌ์ ํ๋ ํจํด์ด ๊ตฌ์ฒด์ ์ผ๋ก ํํ๋๋๋ก ํ์ธ์
|
| 834 |
+
4. ๊ฐ ๋ชจ์์ 25-35์ ๋ด์ธ๋ก ์์ธํ๊ฒ
|
| 835 |
+
5. ์ฌ๋ฌผ์ ๋ณธ๋ ํน์ฑ๊ณผ ๋ถ์ฌ๋ ์ฑ๊ฒฉ์ ํฅ๋ฏธ๋ก์ด ๋๋น๋ฅผ ๋ง๋์ธ์
|
| 836 |
+
6. ์ผ์์ ์ธ ์ํฉ์์ ๋๋ฌ๋๋ ๊ตฌ์ฒด์ ์ธ ๋ชจ์์ ํฌํจํ์ธ์
|
| 837 |
+
|
| 838 |
+
**์์ (์ฐธ๊ณ ์ฉ):**
|
| 839 |
+
- ์คํ
์ธ๋ฆฌ์ค ํฌํธ (์จ๊ธฐ 90, ๋ฅ๋ ฅ 30): "๋ฐ๋ปํ ๋งํฌ๋ก ์๋กํ์ง๋ง ์ ์ ์์ ์ ๋ฌผ ๋์ด๊ธฐ๋ ์ํด๋ฌ์ ๋นํฉํจ"
|
| 840 |
+
- ํ๋ผ์คํฑ ์ธํ (์ธํฅ์ฑ 20, ์ ๋จธ 80): "์กฐ์ฉํ ๊ตฌ์์ ์์ผ๋ฉด์๋ ํผ์ฃ๋ง๋ก ์ฌ์น์๋ ๋๋ด์ ๊ณ์ ์ค์ผ๊ฑฐ๋ฆผ"
|
| 841 |
+
|
| 842 |
+
๋ชจ์์ ํน์ฑ 2๊ฐ๋ฅผ ๋ฒํธ ์์ด ์ค๋ฐ๊ฟ์ผ๋ก ๊ตฌ๋ถํ์ฌ ์์ฑํด์ฃผ์ธ์:
|
| 843 |
+
"""
|
| 844 |
+
|
| 845 |
+
# AI ์์ฑ ์๋
|
| 846 |
+
ai_response = self._generate_text_with_api(ai_prompt)
|
| 847 |
+
|
| 848 |
+
if ai_response and len(ai_response.strip()) > 20:
|
| 849 |
+
# AI ์๋ต ํ์ฑ
|
| 850 |
+
generated_contradictions = []
|
| 851 |
+
lines = ai_response.strip().split('\n')
|
| 852 |
+
for line in lines:
|
| 853 |
+
cleaned_line = line.strip()
|
| 854 |
+
# ๋ฒํธ๋ ๋ถํ์ํ ๊ธฐํธ ์ ๊ฑฐ
|
| 855 |
+
cleaned_line = cleaned_line.lstrip('1234567890.-โข ')
|
| 856 |
+
if cleaned_line and len(cleaned_line) > 10:
|
| 857 |
+
generated_contradictions.append(cleaned_line)
|
| 858 |
+
|
| 859 |
+
# 2๊ฐ ํ๋ณด
|
| 860 |
+
if len(generated_contradictions) >= 2:
|
| 861 |
+
return generated_contradictions[:2]
|
| 862 |
+
elif len(generated_contradictions) >= 1:
|
| 863 |
+
# ๋ถ์กฑํ ๋งํผ ํด๋ฐฑ์์ ์ถ๊ฐ
|
| 864 |
+
generated_contradictions.append(fallback_contradictions[0])
|
| 865 |
+
return generated_contradictions
|
| 866 |
+
|
| 867 |
+
except Exception as e:
|
| 868 |
+
print(f"โ ๏ธ AI ๊ธฐ๋ฐ ๋ชจ์ ์์ฑ ์คํจ: {e}")
|
| 869 |
+
# ์์ธ ๋ฐ์ ์ ๋ชจ์ ๋ชจ์ ์์ฑ ์๋
|
| 870 |
+
try:
|
| 871 |
+
print(f"๐ ๋ชจ์ ๋ชจ์ ์์ฑ ์๋: {object_type} + {material}")
|
| 872 |
+
return self._generate_mock_contradictions(object_type, material, warmth, competence, extraversion, humor)
|
| 873 |
+
except:
|
| 874 |
+
pass
|
| 875 |
+
|
| 876 |
+
# ํด๋ฐฑ: ๋ชจ์ ๋ชจ์ ์์ฑ ๋ง์ง๋ง ์๋
|
| 877 |
+
try:
|
| 878 |
+
print(f"๐ ์ต์ข
๋ชจ์ ๋ชจ์ ์์ฑ: {object_type} + {material}")
|
| 879 |
+
mock_result = self._generate_mock_contradictions(object_type, material, warmth, competence, extraversion, humor)
|
| 880 |
+
if mock_result:
|
| 881 |
+
return mock_result
|
| 882 |
+
except Exception as mock_e:
|
| 883 |
+
print(f"๋ชจ์ ์์ฑ๋ ์คํจ: {mock_e}")
|
| 884 |
+
|
| 885 |
+
# ์ต์ข
ํด๋ฐฑ: ๊ธฐ๋ณธ ๋ชจ์ ์ ํ
|
| 886 |
+
return fallback_contradictions
|
| 887 |
+
|
| 888 |
+
def _generate_mock_contradictions(self, object_type, material, warmth, competence, extraversion, humor):
|
| 889 |
+
"""API ์คํจ ์ ์ฌ๋ฌผ/์ฑ๊ฒฉ ๊ธฐ๋ฐ ๋ชจ์ ๋ชจ์ ์์ฑ (๊ฐ๋ฐ์ฉ)"""
|
| 890 |
+
mock_contradictions = []
|
| 891 |
+
|
| 892 |
+
# ์ฌ๋ฌผ๊ณผ ์ฌ์ง์ ๋ฐ๋ฅธ ๊ธฐ๋ณธ ๋ชจ์
|
| 893 |
+
material_contradictions = {
|
| 894 |
+
"์คํ
์ธ๋ฆฌ์ค": ["๋จ๋จํ ๊ฒ๋ชจ์ต์ด์ง๋ง ๋ง์์ ๋ถ๋๋ฝ๋ค๊ณ ๋งํจ", "์ฐจ๊ฐ์ ๋ณด์ด์ง๋ง ๋จ๊ฑฐ์ด ์ด์ ์ ๊ฐ์ถ๊ณ ์์"],
|
| 895 |
+
"ํ๋ผ์คํฑ": ["๊ฐ๋ฒผ์ ๋ณด์ด์ง๋ง ๋ฌด๊ฑฐ์ด ๊ณ ๋ฏผ์ ์์ฃผ ํจ", "์ธ๊ณต์ ์ด๋ผ๊ณ ๋๋ฆฌ๋ฉด ์์ดํดํ๋ฉด์๋ '์ฒ์ฐ์ด ์ต๊ณ ์ฃ ' ๋ผ๊ณ ๋์กฐํจ"],
|
| 896 |
+
"๋ชฉ์ฌ": ["์์ฐ์ค๋ฝ๋ค๊ณ ์๋ถํ์ง๋ง ์ธ์์ ์ธ ๊ฐ๊ณต์ ๋ถ๋๋ฌ์ํจ", "๋จ๋จํด ๋ณด์ด์ง๋ง ์ต๊ธฐ๋ง ์์ผ๋ฉด ๋ฐ๋ก ๊ฑฑ์ ํ๊ธฐ ์์ํจ"],
|
| 897 |
+
"๋ฉด์ง๋ฌผ": ["๋ถ๋๋ฝ๋ค๊ณ ์นญ์ฐฌ๋ฐ์ผ๋ฉด ๊ธฐ๋ปํ๋ฉด์๋ '๋๋ฌด ๋ง๋๋ง๋ํ๊ฐ?' ๊ฑฑ์ ํจ", "ํฌ๊ทผํ ์ฑ๊ฒฉ์ด์ง๋ง ๋จผ์ง๊ฐ ๋ถ์ผ๋ฉด ๊น๋๋จ๊ธฐ ์์ํจ"],
|
| 898 |
+
"๊ธ์": ["์ฐจ๊ฐ์ด ์ฌ์ง์ด๋ผ๊ณ ํ๋ฉด ์์ดํดํ๋ฉฐ '๋๋ ๋ฐ๋ปํ ์ ์์ด!' ๋ผ๊ณ ํญ๋ณํจ", "๋จ๋จํ๋ค๊ณ ์นญ์ฐฌ๋ฐ์ผ๋ฉด ๊ธฐ๋ปํ์ง๋ง ๋
น์ฌ๊น๋ด ๋ ๋ถ์ํดํจ"]
|
| 899 |
}
|
| 900 |
|
| 901 |
+
# ์ฑ๊ฒฉ ๊ทน๋จ๊ฐ์ ๋ฐ๋ฅธ ๋ชจ์
|
| 902 |
+
personality_contradictions = []
|
| 903 |
+
|
| 904 |
+
if warmth >= 80 and competence <= 30:
|
| 905 |
+
personality_contradictions.extend([
|
| 906 |
+
f"๋ฐ๋ปํ ๋ง๋ก ์๋กํด์ฃผ๋ ค ํ์ง๋ง ์ ์ ์์ ์ ์ผ์ ์ํด๋ฌ์ ๋นํฉํจ",
|
| 907 |
+
f"๋ค๋ฅธ ์ฌ๋ ์ฑ๊ธฐ๋ ๊ฑธ ์ข์ํ๋ฉด์๋ '๋ด๊ฐ ๋ญ ๋์๋๋ฆด ์ ์์๊น์...' ํ๋ฉฐ ์์ ์์ดํจ"
|
| 908 |
+
])
|
| 909 |
+
elif warmth <= 30 and competence >= 80:
|
| 910 |
+
personality_contradictions.extend([
|
| 911 |
+
f"๋ฅ๋ ฅ์ ๋ฐ์ด๋์ง๋ง ์นญ์ฐฌ๋ฐ์ผ๋ฉด '๊ทธ๋ฐ ๊ฑฐ ์๋๋ฐ...' ํ๋ฉฐ ์ด์ํดํจ",
|
| 912 |
+
f"์๋ฒฝํ๊ฒ ์ผ์ ์ฒ๋ฆฌํ๊ณ ๋ '์ด ์ ๋๋ก ๋ถ์กฑํ์ฃ ' ๋ผ๊ณ ๊ฒธ์๋ ๋ ์ฒํจ"
|
| 913 |
+
])
|
| 914 |
+
|
| 915 |
+
if extraversion <= 20 and humor >= 80:
|
| 916 |
+
personality_contradictions.extend([
|
| 917 |
+
f"์กฐ์ฉํ ๊ตฌ์์ ์์ผ๋ฉด์๋ ํผ์ฃ๋ง๋ก ์ฌ์น์๋ ๋๋ด์ ๊ณ์ ์ค์ผ๊ฑฐ๋ฆผ",
|
| 918 |
+
f"๋ง์ ๋ณ๋ก ์ ํ์ง๋ง ๊ฐ๋ ๋์ง๋ ํ๋ง๋๊ฐ ์๊ฐ๋ณด๋ค ์ฌ๋ฐ์ด์ ์ค์ค๋ก ๋๋"
|
| 919 |
+
])
|
| 920 |
+
elif extraversion >= 80 and humor <= 30:
|
| 921 |
+
personality_contradictions.extend([
|
| 922 |
+
f"ํ๋ฐํ๊ฒ ๋งํ์ง๋ง ๋๋ด์ ์ ๋ชปํด์ '์ง๊ธ ์์ผ์
จ๋์?' ํ๊ณ ํ์ธํจ",
|
| 923 |
+
f"์ฌ๊ต์ ์ด๋ผ๊ณ ํ๋ฉด์๋ ์ ๋จธ ์ผ์ค ์๋ค๋ ๋ง์๋ ์์ฒ๋ฐ์"
|
| 924 |
+
])
|
| 925 |
+
|
| 926 |
+
# ์ฑ๊ฒฉ ๊ธฐ๋ฐ ๋ชจ์์ ์ฐ์ ์ถ๊ฐ (์ฌ์ฉ์ ์กฐ์ ๊ฐ ๋ฐ์)
|
| 927 |
+
mock_contradictions.extend(personality_contradictions)
|
| 928 |
+
|
| 929 |
+
# ์ฌ์ง๋ณ ๋ชจ์ ์ถ๊ฐ (์ฑ๊ฒฉ ๋ชจ์์ด ์์ ๋๋ง)
|
| 930 |
+
if not mock_contradictions:
|
| 931 |
+
for mat_key, mat_contradictions in material_contradictions.items():
|
| 932 |
+
if mat_key.lower() in material.lower():
|
| 933 |
+
mock_contradictions.extend(mat_contradictions)
|
| 934 |
+
break
|
| 935 |
+
|
| 936 |
+
# 2๊ฐ ์ ํ (์์ผ๋ฉด ๊ธฐ๋ณธ๊ฐ)
|
| 937 |
+
if len(mock_contradictions) >= 2:
|
| 938 |
+
return mock_contradictions[:2]
|
| 939 |
+
elif len(mock_contradictions) >= 1:
|
| 940 |
+
return [mock_contradictions[0], "๋
ผ๋ฆฌ์ ์ด๋ฉด์๋ ์ง๊ฐ์ ์์กดํ๋ ์ด์ค์ ๋ฉด๋ชจ"]
|
| 941 |
+
else:
|
| 942 |
+
return ["๊ฒ์ผ๋ก๋ ๋์ ํด ๋ณด์ด์ง๋ง, ์์ ๋ฐ๋ปํ ๋ง์์ ๊ฐ์ง", "๋
ผ๋ฆฌ์ ์ด๋ฉด์๋ ์ง๊ฐ์ ์์กดํ๋ ์ด์ค์ ๋ฉด๋ชจ"]
|
| 943 |
|
| 944 |
class HumorMatrix:
|
| 945 |
"""
|
|
|
|
| 1594 |
# ๐ญ PersonalityProfile์์ ๋งค๋ ฅ์ ๊ฒฐํจ ๋์ ์์ฑ (์ด๋ฏธ์ง ๋ถ์๊ณผ ์ฑ๊ฒฉ ํน์ฑ ์ ๋ฌ)
|
| 1595 |
attractive_flaws = personality_profile.generate_attractive_flaws(image_analysis, personality_traits)
|
| 1596 |
|
| 1597 |
+
# ๐ PersonalityProfile์์ ๋ชจ์์ ํน์ฑ ๋์ ์์ฑ (์ด๋ฏธ์ง ๋ถ์๊ณผ ์ฑ๊ฒฉ ํน์ฑ ์ ๋ฌ)
|
| 1598 |
+
contradictions = personality_profile.generate_contradictions(image_analysis, personality_traits)
|
| 1599 |
|
| 1600 |
# ๐ช HumorMatrix ์์ฑ ๋ฐ ํ์ฉ
|
| 1601 |
humor_matrix = HumorMatrix()
|
|
|
|
| 2301 |
attractive_flaws = personality_profile.generate_attractive_flaws()
|
| 2302 |
else:
|
| 2303 |
attractive_flaws = frontend_persona["๋งค๋ ฅ์ ๊ฒฐํจ"]
|
| 2304 |
+
# AI ๊ธฐ๋ฐ ๋ชจ์ ์์ฑ ์๋ (์ด๋ฏธ์ง ๋ถ์๊ณผ ์ฑ๊ฒฉ ํน์ฑ ์ ๋ฌ)
|
| 2305 |
+
if "๋ชจ์์ ํน์ฑ" not in frontend_persona:
|
| 2306 |
+
try:
|
| 2307 |
+
contradictions = personality_profile.generate_contradictions(image_analysis, frontend_persona.get("์ฑ๊ฒฉํน์ฑ", {}))
|
| 2308 |
+
except:
|
| 2309 |
+
contradictions = personality_profile.generate_contradictions()
|
| 2310 |
+
else:
|
| 2311 |
+
contradictions = frontend_persona["๋ชจ์์ ํน์ฑ"]
|
| 2312 |
|
| 2313 |
# ์ด๋ฏธ ์์ฑ๋ ์ํต๋ฐฉ์ ํ์ฉ
|
| 2314 |
communication_style = frontend_persona.get("์ํต๋ฐฉ์", self._generate_communication_style_from_profile(personality_profile))
|
test_contradiction_ai.py
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
# -*- coding: utf-8 -*-
|
| 3 |
+
|
| 4 |
+
import sys
|
| 5 |
+
import os
|
| 6 |
+
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
|
| 7 |
+
|
| 8 |
+
from modules.persona_generator import PersonalityProfile
|
| 9 |
+
|
| 10 |
+
def test_ai_contradiction_generation():
|
| 11 |
+
"""AI ๊ธฐ๋ฐ ๋ชจ์์ ํน์ฑ ์์ฑ ํ
์คํธ"""
|
| 12 |
+
|
| 13 |
+
# ํ
์คํธ ์๋๋ฆฌ์ค 1: ๊ธ์ ์ ๊ธฐํฌํธ (์จ๊ธฐ ๋์, ๋ฅ๋ ฅ ๋ฎ์)
|
| 14 |
+
print("๐ฅ ํ
์คํธ 1: ์คํ
์ธ๋ฆฌ์ค ์ ๊ธฐํฌํธ (์จ๊ธฐ 90, ๋ฅ๋ ฅ 20)")
|
| 15 |
+
print("=" * 60)
|
| 16 |
+
|
| 17 |
+
object_analysis_1 = {
|
| 18 |
+
"object_type": "์ ๊ธฐํฌํธ",
|
| 19 |
+
"materials": ["์คํ
์ธ๋ฆฌ์ค ์คํธ", "ํ๋ผ์คํฑ"],
|
| 20 |
+
"colors": ["์์", "๊ฒ์์"],
|
| 21 |
+
"size": "์ค๊ฐ ํฌ๊ธฐ",
|
| 22 |
+
"condition": "์ํธํจ",
|
| 23 |
+
"estimated_age": "1๋
์ ๋"
|
| 24 |
+
}
|
| 25 |
+
|
| 26 |
+
personality_traits_1 = {
|
| 27 |
+
"์จ๊ธฐ": 90,
|
| 28 |
+
"๋ฅ๋ ฅ": 20,
|
| 29 |
+
"์ธํฅ์ฑ": 60,
|
| 30 |
+
"์ ๋จธ๊ฐ๊ฐ": 80
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
profile1 = PersonalityProfile()
|
| 34 |
+
contradictions1 = profile1.generate_contradictions(object_analysis_1, personality_traits_1)
|
| 35 |
+
|
| 36 |
+
print("๐ ์์ฑ๋ ๋ชจ์์ ํน์ฑ:")
|
| 37 |
+
for i, contradiction in enumerate(contradictions1, 1):
|
| 38 |
+
print(f" {i}. {contradiction}")
|
| 39 |
+
print()
|
| 40 |
+
|
| 41 |
+
# ํ
์คํธ ์๋๋ฆฌ์ค 2: ํ๋ผ์คํฑ ์ธํ (์ธํฅ์ฑ ๋ฎ์, ์ ๋จธ ๋์)
|
| 42 |
+
print("๐งธ ํ
์คํธ 2: ํ๋ผ์คํฑ ์ธํ (์ธํฅ์ฑ 10, ์ ๋จธ๊ฐ๊ฐ 95)")
|
| 43 |
+
print("=" * 60)
|
| 44 |
+
|
| 45 |
+
object_analysis_2 = {
|
| 46 |
+
"object_type": "์ธํ",
|
| 47 |
+
"materials": ["ํ๋ผ์คํฑ", "๋ฉด์ง๋ฌผ"],
|
| 48 |
+
"colors": ["๋ถํ์", "ํฐ์"],
|
| 49 |
+
"size": "์์ ํฌ๊ธฐ",
|
| 50 |
+
"condition": "๋ก์",
|
| 51 |
+
"estimated_age": "์ค๋๋จ"
|
| 52 |
+
}
|
| 53 |
+
|
| 54 |
+
personality_traits_2 = {
|
| 55 |
+
"์จ๊ธฐ": 75,
|
| 56 |
+
"๋ฅ๋ ฅ": 40,
|
| 57 |
+
"์ธํฅ์ฑ": 10,
|
| 58 |
+
"์ ๋จธ๊ฐ๊ฐ": 95
|
| 59 |
+
}
|
| 60 |
+
|
| 61 |
+
profile2 = PersonalityProfile()
|
| 62 |
+
contradictions2 = profile2.generate_contradictions(object_analysis_2, personality_traits_2)
|
| 63 |
+
|
| 64 |
+
print("๐ ์์ฑ๋ ๋ชจ์์ ํน์ฑ:")
|
| 65 |
+
for i, contradiction in enumerate(contradictions2, 1):
|
| 66 |
+
print(f" {i}. {contradiction}")
|
| 67 |
+
print()
|
| 68 |
+
|
| 69 |
+
# ํ
์คํธ ์๋๋ฆฌ์ค 3: ๋ชฉ์ฌ ์ฐํ (๋ฅ๋ ฅ ๋์, ์จ๊ธฐ ๋ฎ์)
|
| 70 |
+
print("โ๏ธ ํ
์คํธ 3: ๋ชฉ์ฌ ์ฐํ (๋ฅ๋ ฅ 95, ์จ๊ธฐ 15)")
|
| 71 |
+
print("=" * 60)
|
| 72 |
+
|
| 73 |
+
object_analysis_3 = {
|
| 74 |
+
"object_type": "์ฐํ",
|
| 75 |
+
"materials": ["๋ชฉ์ฌ", "ํ์ฐ"],
|
| 76 |
+
"colors": ["๋
ธ๋์", "์์"],
|
| 77 |
+
"size": "์์ ํฌ๊ธฐ",
|
| 78 |
+
"condition": "์ฌ์ฉ๋จ",
|
| 79 |
+
"estimated_age": "๋ช ๊ฐ์"
|
| 80 |
+
}
|
| 81 |
+
|
| 82 |
+
personality_traits_3 = {
|
| 83 |
+
"์จ๊ธฐ": 15,
|
| 84 |
+
"๋ฅ๋ ฅ": 95,
|
| 85 |
+
"์ธํฅ์ฑ": 30,
|
| 86 |
+
"์ ๋จธ๊ฐ๊ฐ": 40
|
| 87 |
+
}
|
| 88 |
+
|
| 89 |
+
profile3 = PersonalityProfile()
|
| 90 |
+
contradictions3 = profile3.generate_contradictions(object_analysis_3, personality_traits_3)
|
| 91 |
+
|
| 92 |
+
print("๐ ์์ฑ๋ ๋ชจ์์ ํน์ฑ:")
|
| 93 |
+
for i, contradiction in enumerate(contradictions3, 1):
|
| 94 |
+
print(f" {i}. {contradiction}")
|
| 95 |
+
print()
|
| 96 |
+
|
| 97 |
+
# ํ
์คํธ ์๋๋ฆฌ์ค 4: ์ฒ ์์ฌ ์ฟ ์
(๋ชจ๋ ๊ฐ ๊ทน๋จ)
|
| 98 |
+
print("๐๏ธ ํ
์คํธ 4: ์ฒ ์์ฌ ์ฟ ์
(์จ๊ธฐ 100, ์ธํฅ์ฑ 5)")
|
| 99 |
+
print("=" * 60)
|
| 100 |
+
|
| 101 |
+
object_analysis_4 = {
|
| 102 |
+
"object_type": "์ฟ ์
",
|
| 103 |
+
"materials": ["๋ฉด์ง๋ฌผ", "์"],
|
| 104 |
+
"colors": ["๋ฒ ์ด์ง์"],
|
| 105 |
+
"size": "์ค๊ฐ ํฌ๊ธฐ",
|
| 106 |
+
"condition": "๋งค์ฐ ์ข์",
|
| 107 |
+
"estimated_age": "์๊ฒ"
|
| 108 |
+
}
|
| 109 |
+
|
| 110 |
+
personality_traits_4 = {
|
| 111 |
+
"์จ๊ธฐ": 100,
|
| 112 |
+
"๋ฅ๋ ฅ": 60,
|
| 113 |
+
"์ธํฅ์ฑ": 5,
|
| 114 |
+
"์ ๋จธ๊ฐ๊ฐ": 85
|
| 115 |
+
}
|
| 116 |
+
|
| 117 |
+
profile4 = PersonalityProfile()
|
| 118 |
+
contradictions4 = profile4.generate_contradictions(object_analysis_4, personality_traits_4)
|
| 119 |
+
|
| 120 |
+
print("๐ ์์ฑ๋ ๋ชจ์์ ํน์ฑ:")
|
| 121 |
+
for i, contradiction in enumerate(contradictions4, 1):
|
| 122 |
+
print(f" {i}. {contradiction}")
|
| 123 |
+
print()
|
| 124 |
+
|
| 125 |
+
print("๐ฏ ๊ฒฐ๋ก :")
|
| 126 |
+
print("๊ฐ ํ
์คํธ๋ง๋ค ์ฌ๋ฌผ์ ํน์ฑ๊ณผ ์ฑ๊ฒฉ ์กฐ์ ๊ฐ์ด ๋ฐ์๋")
|
| 127 |
+
print("์ฐฝ์์ ์ด๊ณ ๋งํฌ๊ฐ ๋๋ฌ๋๋ ๋ชจ์์ ํน์ฑ์ด ์์ฑ๋์๋์ง ํ์ธํด๋ณด์ธ์!")
|
| 128 |
+
|
| 129 |
+
if __name__ == "__main__":
|
| 130 |
+
test_ai_contradiction_generation()
|
test_contradiction_extreme.py
ADDED
|
@@ -0,0 +1,134 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
# -*- coding: utf-8 -*-
|
| 3 |
+
|
| 4 |
+
import sys
|
| 5 |
+
import os
|
| 6 |
+
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
|
| 7 |
+
|
| 8 |
+
from modules.persona_generator import PersonalityProfile
|
| 9 |
+
|
| 10 |
+
def test_extreme_personality_contradictions():
|
| 11 |
+
"""๊ทน๋จ์ ์ธ ์ฑ๊ฒฉ ์กฐํฉ ํ
์คํธ - ์ฌ์ฉ์ ์กฐ์ ๊ฐ์ด ํ์คํ ๋๋ฌ๋๋์ง ํ์ธ"""
|
| 12 |
+
|
| 13 |
+
# ํ
์คํธ 1: ์คํ
์ธ๋ฆฌ์ค ์๊ณ (์จ๊ธฐ 100, ๋ฅ๋ ฅ 5) - ๊ทน๋จ ๋๋น
|
| 14 |
+
print("โฐ ํ
์คํธ 1: ์คํ
์ธ๋ฆฌ์ค ์๊ณ (์จ๊ธฐ 100, ๋ฅ๋ ฅ 5)")
|
| 15 |
+
print("=" * 60)
|
| 16 |
+
|
| 17 |
+
object_analysis_1 = {
|
| 18 |
+
"object_type": "์๊ณ",
|
| 19 |
+
"materials": ["์คํ
์ธ๋ฆฌ์ค ์คํธ"],
|
| 20 |
+
"colors": ["์์"],
|
| 21 |
+
"size": "์ค๊ฐ ํฌ๊ธฐ",
|
| 22 |
+
"condition": "์ข์",
|
| 23 |
+
"estimated_age": "์๊ฒ"
|
| 24 |
+
}
|
| 25 |
+
|
| 26 |
+
personality_traits_1 = {
|
| 27 |
+
"์จ๊ธฐ": 100,
|
| 28 |
+
"๋ฅ๋ ฅ": 5,
|
| 29 |
+
"์ธํฅ์ฑ": 50,
|
| 30 |
+
"์ ๋จธ๊ฐ๊ฐ": 50
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
profile1 = PersonalityProfile()
|
| 34 |
+
contradictions1 = profile1.generate_contradictions(object_analysis_1, personality_traits_1)
|
| 35 |
+
|
| 36 |
+
print("๐ ์์ฑ๋ ๋ชจ์์ ํน์ฑ:")
|
| 37 |
+
for i, contradiction in enumerate(contradictions1, 1):
|
| 38 |
+
print(f" {i}. {contradiction}")
|
| 39 |
+
print("โ
์์: ๋ฐ๋ปํจ + ์ํผ์ด ๋๋ฌ๋์ผ ํจ")
|
| 40 |
+
print()
|
| 41 |
+
|
| 42 |
+
# ํ
์คํธ 2: ํ๋ผ์คํฑ ๋ก๋ด (์จ๊ธฐ 5, ๋ฅ๋ ฅ 100) - ๋ฐ๋ ๊ทน๋จ
|
| 43 |
+
print("๐ค ํ
์คํธ 2: ํ๋ผ์คํฑ ๋ก๋ด (์จ๊ธฐ 5, ๋ฅ๋ ฅ 100)")
|
| 44 |
+
print("=" * 60)
|
| 45 |
+
|
| 46 |
+
object_analysis_2 = {
|
| 47 |
+
"object_type": "๋ก๋ด",
|
| 48 |
+
"materials": ["ํ๋ผ์คํฑ", "๊ธ์"],
|
| 49 |
+
"colors": ["ํฐ์", "ํ๋์"],
|
| 50 |
+
"size": "์ค๊ฐ ํฌ๊ธฐ",
|
| 51 |
+
"condition": "์๊ฒ",
|
| 52 |
+
"estimated_age": "์๊ฒ"
|
| 53 |
+
}
|
| 54 |
+
|
| 55 |
+
personality_traits_2 = {
|
| 56 |
+
"์จ๊ธฐ": 5,
|
| 57 |
+
"๋ฅ๋ ฅ": 100,
|
| 58 |
+
"์ธํฅ์ฑ": 50,
|
| 59 |
+
"์ ๋จธ๊ฐ๊ฐ": 50
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
+
profile2 = PersonalityProfile()
|
| 63 |
+
contradictions2 = profile2.generate_contradictions(object_analysis_2, personality_traits_2)
|
| 64 |
+
|
| 65 |
+
print("๐ ์์ฑ๋ ๋ชจ์์ ํน์ฑ:")
|
| 66 |
+
for i, contradiction in enumerate(contradictions2, 1):
|
| 67 |
+
print(f" {i}. {contradiction}")
|
| 68 |
+
print("โ
์์: ์ฐจ๊ฐ์ + ๋ฐ์ด๋ ๋ฅ๋ ฅ์ด ๋๋ฌ๋์ผ ํจ")
|
| 69 |
+
print()
|
| 70 |
+
|
| 71 |
+
# ํ
์คํธ 3: ๋ฉด ์ธํ (์ธํฅ์ฑ 5, ์ ๋จธ 100) - ๋ดํฅ์ ์ ๋จธ๋ฌ์ค
|
| 72 |
+
print("๐งธ ํ
์คํธ 3: ๋ฉด ์ธํ (์ธํฅ์ฑ 5, ์ ๋จธ 100)")
|
| 73 |
+
print("=" * 60)
|
| 74 |
+
|
| 75 |
+
object_analysis_3 = {
|
| 76 |
+
"object_type": "์ธํ",
|
| 77 |
+
"materials": ["๋ฉด์ง๋ฌผ", "์"],
|
| 78 |
+
"colors": ["๋ถํ์"],
|
| 79 |
+
"size": "์์ ํฌ๊ธฐ",
|
| 80 |
+
"condition": "์ค๋๋จ",
|
| 81 |
+
"estimated_age": "์ค๋๋จ"
|
| 82 |
+
}
|
| 83 |
+
|
| 84 |
+
personality_traits_3 = {
|
| 85 |
+
"์จ๊ธฐ": 70,
|
| 86 |
+
"๋ฅ๋ ฅ": 50,
|
| 87 |
+
"์ธํฅ์ฑ": 5,
|
| 88 |
+
"์ ๋จธ๊ฐ๊ฐ": 100
|
| 89 |
+
}
|
| 90 |
+
|
| 91 |
+
profile3 = PersonalityProfile()
|
| 92 |
+
contradictions3 = profile3.generate_contradictions(object_analysis_3, personality_traits_3)
|
| 93 |
+
|
| 94 |
+
print("๐ ์์ฑ๋ ๋ชจ์์ ํน์ฑ:")
|
| 95 |
+
for i, contradiction in enumerate(contradictions3, 1):
|
| 96 |
+
print(f" {i}. {contradiction}")
|
| 97 |
+
print("โ
์์: ์กฐ์ฉํจ + ๋ฐ์ด๋ ์ ๋จธ ๊ฐ๊ฐ์ด ๋๋ฌ๋์ผ ํจ")
|
| 98 |
+
print()
|
| 99 |
+
|
| 100 |
+
# ํ
์คํธ 4: ๋ชฉ์ฌ ํธ๋กํผ (์ธํฅ์ฑ 100, ์ ๋จธ 5) - ์ธํฅ์ ์ด์ง๋ง ์ ๋จธ์์
|
| 101 |
+
print("๐ ํ
์คํธ 4: ๋ชฉ์ฌ ํธ๋กํผ (์ธํฅ์ฑ 100, ์ ๋จธ 5)")
|
| 102 |
+
print("=" * 60)
|
| 103 |
+
|
| 104 |
+
object_analysis_4 = {
|
| 105 |
+
"object_type": "ํธ๋กํผ",
|
| 106 |
+
"materials": ["๋ชฉ์ฌ", "๊ธ์"],
|
| 107 |
+
"colors": ["๊ธ์", "๊ฐ์"],
|
| 108 |
+
"size": "ํฐ ํฌ๊ธฐ",
|
| 109 |
+
"condition": "์ข์",
|
| 110 |
+
"estimated_age": "๋ช ๋
"
|
| 111 |
+
}
|
| 112 |
+
|
| 113 |
+
personality_traits_4 = {
|
| 114 |
+
"์จ๊ธฐ": 60,
|
| 115 |
+
"๋ฅ๋ ฅ": 80,
|
| 116 |
+
"์ธํฅ์ฑ": 100,
|
| 117 |
+
"์ ๋จธ๊ฐ๊ฐ": 5
|
| 118 |
+
}
|
| 119 |
+
|
| 120 |
+
profile4 = PersonalityProfile()
|
| 121 |
+
contradictions4 = profile4.generate_contradictions(object_analysis_4, personality_traits_4)
|
| 122 |
+
|
| 123 |
+
print("๐ ์์ฑ๋ ๋ชจ์์ ํน์ฑ:")
|
| 124 |
+
for i, contradiction in enumerate(contradictions4, 1):
|
| 125 |
+
print(f" {i}. {contradiction}")
|
| 126 |
+
print("โ
์์: ํ๋ฐํจ + ์ ๋จธ ๋ถ์กฑ์ด ๋๋ฌ๋์ผ ํจ")
|
| 127 |
+
print()
|
| 128 |
+
|
| 129 |
+
print("๐ฏ ๊ทน๋จ ํ
์คํธ ๊ฒฐ๋ก :")
|
| 130 |
+
print("์ฌ์ฉ์๊ฐ ์กฐ์ ํ ๊ทน๋จ์ ์ธ ์ฑ๊ฒฉ ์์น๋ค์ด")
|
| 131 |
+
print("๋ชจ์์ ํน์ฑ์์ ๊ตฌ์ฒด์ ์ธ ๋งํฌ์ ํ๋์ผ๋ก ๋๋ฌ๋๋์ง ํ์ธ!")
|
| 132 |
+
|
| 133 |
+
if __name__ == "__main__":
|
| 134 |
+
test_extreme_personality_contradictions()
|