Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,315 +1,221 @@
|
|
1 |
-
# ==================== SoulCompass International - Complete App ====================
|
2 |
-
|
3 |
import streamlit as st
|
4 |
-
import json
|
5 |
import random
|
6 |
-
import
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
|
|
|
|
|
|
|
|
11 |
|
12 |
-
#
|
13 |
|
14 |
LANGUAGES = {
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
"๐ฉ๐ช Deutsch": "de",
|
20 |
-
"๐ฏ๐ต ๆฅๆฌ่ช": "ja",
|
21 |
-
"๐ฐ๐ท ํ๊ตญ์ด": "ko",
|
22 |
-
"๐ฎ๐ณ เคนเคฟเคจเฅเคฆเฅ": "hi"
|
23 |
}
|
24 |
|
25 |
-
#
|
26 |
|
27 |
-
|
28 |
โenโ: {
|
29 |
-
โ
|
30 |
-
โ
|
31 |
-
โ
|
32 |
-
โ
|
33 |
-
โ
|
34 |
-
โ
|
35 |
-
โ
|
36 |
-
โ
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
# Tarot Section
|
48 |
-
"tarot_title": "๐ฎ Tarot Reading - Explore Life's Questions",
|
49 |
-
"tarot_desc": "Let ancient tarot wisdom guide your life's direction",
|
50 |
-
"question_placeholder": "Example: I'm facing difficulties at work and don't know which path to choose next...",
|
51 |
-
"question_label": "๐ญ Please describe your question in detail",
|
52 |
-
"spread_label": "Choose Tarot Spread",
|
53 |
-
"start_reading": "๐ฎ Start Tarot Reading",
|
54 |
-
"reading_complete": "โจ Reading Complete!",
|
55 |
-
"remaining_quota": "Remaining free readings today",
|
56 |
-
"quota_exceeded": "๐ Daily free quota exceeded! Come back tomorrow or upgrade to Pro",
|
57 |
-
|
58 |
-
# Spreads
|
59 |
-
"single_card": "Single Card - Quick Guidance",
|
60 |
-
"three_card": "Three Cards - Past Present Future",
|
61 |
-
"love_triangle": "Love Triangle - Relationship Focus",
|
62 |
-
"career_cross": "Career Cross - Work Development",
|
63 |
-
|
64 |
-
# Numerology Section
|
65 |
-
"numerology_title": "๐ข Numerology - Decode Your Life Numbers",
|
66 |
-
"numerology_desc": "Discover your life's mysteries through the power of numbers",
|
67 |
-
"life_number_title": "๐
Life Path Number Calculation",
|
68 |
-
"birth_date_label": "Select your birth date",
|
69 |
-
"calculate_life_number": "๐ Calculate Life Number",
|
70 |
-
"name_numerology_title": "๐ Name Numerology",
|
71 |
-
"name_input_label": "Enter your full name",
|
72 |
-
"calculate_name_number": "โจ Analyze Name Number",
|
73 |
-
|
74 |
-
# Journal Section
|
75 |
-
"journal_title": "๐ Soul Journal - Record Your Inner Growth",
|
76 |
-
"journal_desc": "Track your emotional journey and connect with your inner self",
|
77 |
-
"mood_today": "๐ Today's Mood Record",
|
78 |
-
"mood_score": "Today's mood score",
|
79 |
-
"main_emotion": "Primary emotion",
|
80 |
-
"energy_level": "Energy level",
|
81 |
-
"gratitude": "What are you grateful for today",
|
82 |
-
"journal_content": "๐ Today's Soul Journal Entry",
|
83 |
-
"journal_placeholder": "Write about your thoughts, feelings, experiences, or anything you want to record today...",
|
84 |
-
"save_journal": "๐พ Save Today's Journal",
|
85 |
-
"journal_saved": "โ
Journal saved! Another precious record added to your soul's growth journey ๐ฑ",
|
86 |
-
|
87 |
-
# AI Therapist Section
|
88 |
-
"ai_therapist_title": "๐ค AI Therapist - Soul Conversation Companion",
|
89 |
-
"ai_therapist_desc": "24/7 soul guide providing warm support and guidance",
|
90 |
-
"ai_intro_title": "SoulCompass AI Therapist",
|
91 |
-
"ai_intro_desc": "Your dedicated soul guide, always here to provide support and companionship",
|
92 |
-
"conversation_topics": "๐ฏ Choose conversation topic",
|
93 |
-
"general_chat": "๐ญ General Soul Conversation",
|
94 |
-
"stress_anxiety": "๐ฐ Stress & Anxiety Support",
|
95 |
-
"relationship": "๐ Relationship Counseling",
|
96 |
-
"life_goals": "๐ฏ Life Goals Discussion",
|
97 |
-
"meditation": "๐ง Meditation & Relaxation",
|
98 |
-
"personal_growth": "๐ฑ Personal Growth Advice",
|
99 |
-
"chat_placeholder": "Tell me how you're feeling, or what you'd like to discuss...",
|
100 |
-
"start_conversation": "๐ซ Start Conversation",
|
101 |
-
|
102 |
-
# Emotions
|
103 |
-
"emotion_happy": "๐ Happy",
|
104 |
-
"emotion_sad": "๐ Sad",
|
105 |
-
"emotion_anxious": "๐ฐ Anxious",
|
106 |
-
"emotion_angry": "๐ก Angry",
|
107 |
-
"emotion_calm": "๐ Calm",
|
108 |
-
"emotion_grateful": "๐ค Grateful",
|
109 |
-
"emotion_tired": "๐ด Tired",
|
110 |
-
"emotion_confused": "๐ค Confused",
|
111 |
-
|
112 |
-
# Common UI Elements
|
113 |
-
"loading": "Loading...",
|
114 |
-
"please_wait": "Please wait...",
|
115 |
-
"error": "An error occurred",
|
116 |
-
"success": "Success!",
|
117 |
-
"try_again": "Please try again",
|
118 |
-
"back": "Back",
|
119 |
-
"next": "Next",
|
120 |
-
"cancel": "Cancel",
|
121 |
-
"confirm": "Confirm",
|
122 |
-
"close": "Close",
|
123 |
-
|
124 |
-
# FAQ
|
125 |
-
"faq_title": "โ Frequently Asked Questions",
|
126 |
-
"faq_1_q": "Is SoulCompass really free?",
|
127 |
-
"faq_1_a": "Yes! We provide 5 completely free readings daily, no registration or payment required.",
|
128 |
-
"faq_2_q": "How accurate is the AI tarot reading?",
|
129 |
-
"faq_2_a": "Our AI system combines traditional tarot wisdom with modern data analysis, achieving 94.7% accuracy.",
|
130 |
-
"faq_3_q": "What types of questions can I ask?",
|
131 |
-
"faq_3_a": "You can ask about love, career, finances, health, relationships, or any life question.",
|
132 |
-
|
133 |
-
# Testimonials
|
134 |
-
"testimonials_title": "๐ฌ User Testimonials",
|
135 |
-
"testimonial_1": "SoulCompass tarot readings are incredibly accurate! The AI interpretation perfectly matched my situation.",
|
136 |
-
"testimonial_2": "As a tarot enthusiast, I've tried many websites. SoulCompass has the most in-depth readings!",
|
137 |
-
"testimonial_3": "The numerology analysis was surprisingly accurate! SoulCompass really helped me find direction!",
|
138 |
-
|
139 |
-
# Pro Version
|
140 |
-
"upgrade_pro": "๐ Upgrade to Pro",
|
141 |
-
"pro_features": "Pro Features",
|
142 |
-
"unlimited_readings": "Unlimited readings",
|
143 |
-
"detailed_reports": "Detailed reports",
|
144 |
-
"full_history": "Complete history",
|
145 |
-
"priority_support": "Priority support",
|
146 |
-
"early_bird_price": "Early bird price: $6.99/month"
|
147 |
},
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
# Tarot Section
|
168 |
-
"tarot_title": "๐ฎ ๅก็พ
ๅ ๅ - ๆข็ดขไบบ็ๅ้ก",
|
169 |
-
"tarot_desc": "่ฎๅค่็ๅก็พ
ๆบๆ
ง็บๆจๆๅผไบบ็ๆนๅ",
|
170 |
-
"question_placeholder": "ไพๅฆ๏ผๆๆ่ฟๅจๅทฅไฝไธ้ๅฐๅฐ้ฃ๏ผไธ็ฅ้่ฉฒๅฆไฝ้ธๆไธไธๆญฅ...",
|
171 |
-
"question_label": "๐ญ ่ซ่ฉณ็ดฐๆ่ฟฐๆจๆณ่ฆๅ ๅ็ๅ้ก",
|
172 |
-
"spread_label": "้ธๆๅก็พ
็้ฃ",
|
173 |
-
"start_reading": "๐ฎ ้ๅงๅก็พ
ๅ ๅ",
|
174 |
-
"reading_complete": "โจ ๅ ๅๅฎๆ๏ผ",
|
175 |
-
"remaining_quota": "ไปๆฅๅฉ้คๅ
่ฒปๅ ๅๆฌกๆธ",
|
176 |
-
"quota_exceeded": "๐ ไปๆฅๅ
่ฒป้กๅบฆๅทฒ็จๅฎ๏ผๆๅคฉๅไพๆๅ็ด Pro",
|
177 |
-
|
178 |
-
"single_card": "ๅฎๅผต็ - ๅฟซ้ๆๅผ",
|
179 |
-
"three_card": "ไธๅผต็ - ้ๅป็พๅจๆชไพ",
|
180 |
-
"love_triangle": "ๆๆ
ไธ่ง - ๆๆ
ๅฐ็จ",
|
181 |
-
"career_cross": "ไบๆฅญๅๅญ - ๅทฅไฝ็ผๅฑ",
|
182 |
-
|
183 |
-
"numerology_title": "๐ข ๆธๅญๅ ๅ - ่งฃ่ฎ็ๅฝๅฏ็ขผ",
|
184 |
-
"numerology_desc": "้้ๆธๅญ็็ฅ็งๅ้๏ผ็ผ็พๆจ็ไบบ็ๅฏ็ขผ",
|
185 |
-
"life_number_title": "๐
็ๅฝ้ๆธ่จ็ฎ",
|
186 |
-
"birth_date_label": "้ธๆๆจ็ๅบ็ๆฅๆ",
|
187 |
-
"calculate_life_number": "๐ ่จ็ฎ็ๅฝ้ๆธ",
|
188 |
-
"name_numerology_title": "๐ ๅงๅๆธๅญๅญธ",
|
189 |
-
"name_input_label": "่ผธๅ
ฅๆจ็ๅงๅ",
|
190 |
-
"calculate_name_number": "โจ ๅๆๅงๅๆธๅญ",
|
191 |
-
|
192 |
-
"journal_title": "๐ ๅฟ้ๆฅ่จ - ่จ้ๅ
งๅฟๆ้ท",
|
193 |
-
"journal_desc": "่ฟฝ่นคๆ
็ท่ป่ทก๏ผ่ๅ
งๅจ่ชๆๆทฑๅบฆๅฐ่ฉฑ",
|
194 |
-
"mood_today": "๐ ไปๆฅๅฟๆ
่จ้",
|
195 |
-
"mood_score": "ไปๆฅๅฟๆ
ๆๆธ",
|
196 |
-
"main_emotion": "ไธป่ฆๆ
็ท",
|
197 |
-
"energy_level": "่ฝ้ๆฐดๅนณ",
|
198 |
-
"gratitude": "ไปๆฅๆๆฉ็ไบ",
|
199 |
-
"journal_content": "๐ ไปๆฅๅฟ้ๆฅ่จ",
|
200 |
-
"journal_placeholder": "ๅฏซไธไปๅคฉ็ๆณๆณใๆๅใ็ถๆญทๆไปปไฝๆณ่จ้็ๅ
งๅฎน...",
|
201 |
-
"save_journal": "๐พ ไฟๅญไปๆฅๆฅ่จ",
|
202 |
-
"journal_saved": "โ
ๆฅ่จๅทฒไฟๅญ๏ผๆจ็ๅฟ้ๆ้ท่ป่ทกๅๅขๅ ไบ็่ฒด็ไธ็ญ่จ้ ๐ฑ",
|
203 |
-
|
204 |
-
"ai_therapist_title": "๐ค AI็็ๅธซ - ๅฟ้ๅฐ่ฉฑ้ชไผด",
|
205 |
-
"ai_therapist_desc": "24ๅฐๆ้ชไผด็ๅฟ้ๅฐๅธซ๏ผๆไพๆบซๆๆฏๆ",
|
206 |
-
"ai_intro_title": "SoulCompass AI ็็ๅธซ",
|
207 |
-
"ai_intro_desc": "ๆจ็ๅฐๅฑฌๅฟ้ๅฐๅธซ๏ผ้จๆ็บๆจๆไพๆฏๆ่้ชไผด",
|
208 |
-
"conversation_topics": "๐ฏ ้ธๆๅฐ่ฉฑไธป้ก",
|
209 |
-
"general_chat": "๐ญ ไธ่ฌๅฟ้ๅฐ่ฉฑ",
|
210 |
-
"stress_anxiety": "๐ฐ ๅฃๅ็ฆๆ
ฎ็ๅฐ",
|
211 |
-
"relationship": "๐ ๆๆ
ๅ้ก่ซฎ่ฉข",
|
212 |
-
"life_goals": "๐ฏ ไบบ็็ฎๆจๆข่จ",
|
213 |
-
"meditation": "๐ง ๅฅๆณๆพ้ฌๆๅฐ",
|
214 |
-
"personal_growth": "๐ฑ ่ชๆๆ้ทๅปบ่ญฐ",
|
215 |
-
"chat_placeholder": "ๅ่จดๆๆจ็พๅจ็ๆๅ๏ผๆๆณ่ฆ่จ่ซ็ๅ้ก...",
|
216 |
-
"start_conversation": "๐ซ ้ๅงๅฐ่ฉฑ"
|
217 |
}
|
218 |
-
```
|
219 |
-
|
220 |
}
|
221 |
|
222 |
-
#
|
223 |
-
|
224 |
-
st.set_page_config(
|
225 |
-
page_title=โ๐งญ SoulCompass - Find Your Inner North Star | Internationalโ,
|
226 |
-
page_icon=โ๐งญโ,
|
227 |
-
layout=โwideโ,
|
228 |
-
initial_sidebar_state=โcollapsedโ
|
229 |
-
)
|
230 |
|
231 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
232 |
|
233 |
-
|
234 |
-
st.session_state.language = โenโ
|
235 |
|
236 |
if โdaily_usageโ not in st.session_state:
|
237 |
st.session_state.daily_usage = 0
|
238 |
|
239 |
-
if โ
|
240 |
-
st.session_state.
|
241 |
|
242 |
if โjournal_entriesโ not in st.session_state:
|
243 |
st.session_state.journal_entries = []
|
244 |
|
245 |
def get_text(key):
|
246 |
โโโ็ฒๅ็ถๅ่ช่จ็ๆๆฌโโโ
|
247 |
-
|
248 |
-
return TRANSLATIONS.get(lang, TRANSLATIONS[โenโ]).get(key, key)
|
249 |
-
|
250 |
-
def change_language(selected_lang):
|
251 |
-
โโโๅๆ่ช่จโโโ
|
252 |
-
lang_code = LANGUAGES[selected_lang]
|
253 |
-
st.session_state.language = lang_code
|
254 |
|
255 |
-
|
|
|
|
|
|
|
256 |
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
261 |
|
|
|
|
|
|
|
|
|
262 |
```
|
263 |
-
:root {
|
264 |
-
--primary-color: #6366F1;
|
265 |
-
--secondary-color: #F59E0B;
|
266 |
-
--accent-color: #C084FC;
|
267 |
-
--dark-blue: #1E3A8A;
|
268 |
-
--text-primary: #1F2937;
|
269 |
-
--text-secondary: #6B7280;
|
270 |
-
--background-light: #F8FAFC;
|
271 |
-
}
|
272 |
|
273 |
-
|
|
|
|
|
|
|
|
|
|
|
274 |
text-align: center;
|
275 |
-
background: linear-gradient(135deg,
|
276 |
color: white;
|
277 |
-
padding:
|
278 |
border-radius: 20px;
|
279 |
margin-bottom: 2rem;
|
280 |
box-shadow: 0 20px 40px rgba(99, 102, 241, 0.3);
|
281 |
-
position: relative;
|
282 |
-
overflow: hidden;
|
283 |
-
}
|
284 |
-
|
285 |
-
.soulcompass-international-header::before {
|
286 |
-
content: '';
|
287 |
-
position: absolute;
|
288 |
-
top: -50%;
|
289 |
-
left: -50%;
|
290 |
-
width: 200%;
|
291 |
-
height: 200%;
|
292 |
-
background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 50%);
|
293 |
-
animation: rotate 20s linear infinite;
|
294 |
}
|
295 |
|
296 |
-
|
297 |
-
|
298 |
-
100% { transform: rotate(360deg); }
|
299 |
-
}
|
300 |
-
|
301 |
-
.soulcompass-international-header h1 {
|
302 |
-
font-family: 'Cinzel', serif;
|
303 |
-
font-size: 4rem;
|
304 |
font-weight: 600;
|
305 |
margin-bottom: 1rem;
|
306 |
text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
|
307 |
-
position: relative;
|
308 |
-
z-index: 1;
|
309 |
}
|
310 |
|
311 |
.compass-icon {
|
312 |
-
font-size:
|
313 |
margin-bottom: 1rem;
|
314 |
display: inline-block;
|
315 |
animation: compass-spin 3s ease-in-out infinite;
|
@@ -320,270 +226,459 @@ st.markdown(โโโ
|
|
320 |
50% { transform: rotate(10deg); }
|
321 |
}
|
322 |
|
323 |
-
.
|
324 |
-
background:
|
325 |
-
border
|
326 |
-
padding: 2.5rem;
|
327 |
-
box-shadow: 0 10px 30px rgba(0,0,0,0.1);
|
328 |
-
border: 2px solid transparent;
|
329 |
-
transition: all 0.3s ease;
|
330 |
-
height: 100%;
|
331 |
-
text-align: center;
|
332 |
-
}
|
333 |
-
|
334 |
-
.international-feature-card:hover {
|
335 |
-
border-color: var(--primary-color);
|
336 |
-
transform: translateY(-5px);
|
337 |
-
box-shadow: 0 20px 40px rgba(99, 102, 241, 0.2);
|
338 |
-
}
|
339 |
-
|
340 |
-
.feature-icon {
|
341 |
-
font-size: 4rem;
|
342 |
-
margin-bottom: 1.5rem;
|
343 |
-
display: block;
|
344 |
-
}
|
345 |
-
|
346 |
-
.global-stats {
|
347 |
-
background: linear-gradient(135deg, #F8FAFC 0%, #E2E8F0 100%);
|
348 |
-
border-radius: 20px;
|
349 |
-
padding: 2rem;
|
350 |
-
margin: 2rem 0;
|
351 |
-
display: flex;
|
352 |
-
justify-content: space-around;
|
353 |
-
align-items: center;
|
354 |
-
flex-wrap: wrap;
|
355 |
-
}
|
356 |
-
|
357 |
-
.stat-item {
|
358 |
-
text-align: center;
|
359 |
-
margin: 1rem;
|
360 |
-
}
|
361 |
-
|
362 |
-
.stat-number {
|
363 |
-
font-size: 3rem;
|
364 |
-
font-weight: 700;
|
365 |
-
color: var(--primary-color);
|
366 |
-
display: block;
|
367 |
-
font-family: 'Inter', sans-serif;
|
368 |
-
}
|
369 |
-
|
370 |
-
.stat-label {
|
371 |
-
color: var(--text-secondary);
|
372 |
-
font-size: 1rem;
|
373 |
-
margin-top: 0.5rem;
|
374 |
-
font-weight: 500;
|
375 |
-
}
|
376 |
-
|
377 |
-
.tarot-card-international {
|
378 |
-
background: linear-gradient(135deg, var(--dark-blue) 0%, var(--primary-color) 100%);
|
379 |
-
border: 3px solid var(--secondary-color);
|
380 |
border-radius: 20px;
|
381 |
padding: 2rem;
|
382 |
color: white;
|
383 |
text-align: center;
|
|
|
384 |
box-shadow: 0 15px 35px rgba(0,0,0,0.3);
|
385 |
transition: all 0.4s ease;
|
386 |
-
min-width: 220px;
|
387 |
-
min-height: 320px;
|
388 |
-
position: relative;
|
389 |
-
overflow: hidden;
|
390 |
-
margin: 1rem;
|
391 |
}
|
392 |
|
393 |
-
.tarot-card
|
394 |
-
|
395 |
-
position: absolute;
|
396 |
-
top: 15px;
|
397 |
-
right: 20px;
|
398 |
-
font-size: 2rem;
|
399 |
-
opacity: 0.8;
|
400 |
}
|
401 |
|
402 |
-
.
|
403 |
-
|
404 |
-
box-shadow: 0 25px 50px rgba(99, 102, 241, 0.4);
|
405 |
-
}
|
406 |
-
|
407 |
-
.reading-result-international {
|
408 |
-
background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
|
409 |
color: white;
|
410 |
-
padding:
|
411 |
border-radius: 20px;
|
412 |
margin: 2rem 0;
|
413 |
box-shadow: 0 15px 35px rgba(99, 102, 241, 0.3);
|
414 |
-
position: relative;
|
415 |
}
|
416 |
|
417 |
-
.
|
418 |
-
|
419 |
-
position: absolute;
|
420 |
-
top: 25px;
|
421 |
-
right: 30px;
|
422 |
-
font-size: 2.5rem;
|
423 |
-
opacity: 0.8;
|
424 |
-
}
|
425 |
-
|
426 |
-
.quota-display-international {
|
427 |
-
background: linear-gradient(135deg, var(--secondary-color) 0%, #FB923C 100%);
|
428 |
color: white;
|
429 |
-
padding:
|
430 |
border-radius: 50px;
|
431 |
text-align: center;
|
432 |
font-weight: 600;
|
433 |
-
font-size: 1.2rem;
|
434 |
-
box-shadow: 0 8px 20px rgba(245, 158, 11, 0.3);
|
435 |
margin: 2rem auto;
|
436 |
-
max-width:
|
437 |
}
|
438 |
|
439 |
-
.
|
440 |
-
background: linear-gradient(135deg, #FFF7ED 0%, #FEF3C7 100%);
|
441 |
-
border-left: 5px solid var(--secondary-color);
|
442 |
-
padding: 2rem;
|
443 |
-
border-radius: 15px;
|
444 |
-
margin: 1.5rem 0;
|
445 |
-
box-shadow: 0 4px 15px rgba(245, 158, 11, 0.1);
|
446 |
-
}
|
447 |
-
|
448 |
-
.faq-item-international {
|
449 |
background: white;
|
450 |
-
border: 2px solid #E5E7EB;
|
451 |
border-radius: 15px;
|
452 |
-
margin: 20px 0;
|
453 |
padding: 2rem;
|
454 |
-
box-shadow: 0 4px 15px rgba(0,0,0,0.
|
|
|
455 |
transition: all 0.3s ease;
|
|
|
456 |
}
|
457 |
|
458 |
-
.
|
459 |
-
border-color:
|
460 |
-
|
461 |
}
|
462 |
|
463 |
-
.
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
|
|
468 |
}
|
469 |
|
470 |
-
.
|
471 |
-
|
472 |
-
|
473 |
-
|
|
|
|
|
474 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
475 |
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
481 |
|
482 |
-
|
483 |
-
|
484 |
-
|
|
|
|
|
485 |
|
486 |
-
|
487 |
-
|
488 |
-
|
|
|
|
|
|
|
|
|
489 |
|
490 |
-
.
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
496 |
```
|
497 |
|
498 |
-
|
499 |
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
โThe High Priestessโ: {โmeaningโ: โIntuition, mystery, inner wisdomโ, โdescriptionโ: โRepresents inner wisdom and intuitive guidanceโ},
|
504 |
-
โThe Empressโ: {โmeaningโ: โFertility, motherhood, creationโ, โdescriptionโ: โSymbolizes maternal energy and creativityโ},
|
505 |
-
โThe Emperorโ: {โmeaningโ: โAuthority, structure, controlโ, โdescriptionโ: โRepresents authority and orderโ},
|
506 |
-
โThe Hierophantโ: {โmeaningโ: โSpiritual guidance, traditionโ, โdescriptionโ: โProvides spiritual guidance and wisdomโ},
|
507 |
-
โThe Loversโ: {โmeaningโ: โLove, relationships, choicesโ, โdescriptionโ: โSymbolizes love and important choicesโ},
|
508 |
-
โThe Chariotโ: {โmeaningโ: โVictory, willpower, controlโ, โdescriptionโ: โAchieving victory through determinationโ},
|
509 |
-
โStrengthโ: {โmeaningโ: โInner strength, courageโ, โdescriptionโ: โSymbolizes inner courage and gentle strengthโ},
|
510 |
-
โThe Hermitโ: {โmeaningโ: โIntrospection, searching, wisdomโ, โdescriptionโ: โRepresents inner exploration and seeking wisdomโ},
|
511 |
-
โWheel of Fortuneโ: {โmeaningโ: โFate, cycles, changeโ, โdescriptionโ: โSymbolizes lifeโs cycles and transformationโ},
|
512 |
-
โJusticeโ: {โmeaningโ: โFairness, balance, truthโ, โdescriptionโ: โRepresents fairness and moral choicesโ},
|
513 |
-
โThe Hanged Manโ: {โmeaningโ: โSacrifice, pause, new perspectiveโ, โdescriptionโ: โGaining new insights through letting goโ},
|
514 |
-
โDeathโ: {โmeaningโ: โTransformation, endings, rebirthโ, โdescriptionโ: โRepresents endings and new beginningsโ},
|
515 |
-
โTemperanceโ: {โmeaningโ: โBalance, patience, harmonyโ, โdescriptionโ: โTeaching balance and moderationโ},
|
516 |
-
โThe Devilโ: {โmeaningโ: โBondage, temptation, addictionโ, โdescriptionโ: โSymbolizes inner fears and bondageโ},
|
517 |
-
โThe Towerโ: {โmeaningโ: โSudden change, destruction, awakeningโ, โdescriptionโ: โRepresents sudden awakening and transformationโ},
|
518 |
-
โThe Starโ: {โmeaningโ: โHope, inspiration, healingโ, โdescriptionโ: โSymbolizes hope and guidanceโ},
|
519 |
-
โThe Moonโ: {โmeaningโ: โIllusion, intuition, subconsciousโ, โdescriptionโ: โRepresents subconscious and intuitionโ},
|
520 |
-
โThe Sunโ: {โmeaningโ: โSuccess, joy, vitalityโ, โdescriptionโ: โSymbolizes success and positive energyโ},
|
521 |
-
โJudgementโ: {โmeaningโ: โRebirth, inner callingโ, โdescriptionโ: โRepresents spiritual awakening and rebirthโ},
|
522 |
-
โThe Worldโ: {โmeaningโ: โCompletion, achievement, fulfillmentโ, โdescriptionโ: โRepresents goal achievement and completionโ}
|
523 |
-
}
|
524 |
|
525 |
-
|
526 |
-
โๆ่
โ: {โmeaningโ: โๆฐ้ๅงใๅ้ชใ็ด็โ, โdescriptionโ: โไปฃ่กจไบบ็ๆ
็จ็้ๅง๏ผ่ฑกๅพต็ก้ๅฏ่ฝๆงโ},
|
527 |
-
โ้ญ่กๅธซโ: {โmeaningโ: โๅต้ ๅใๆ่ฝใๆๅฟๅโ, โdescriptionโ: โๆๆๅฏฆ็พ็ฎๆจ็ๆๆๅทฅๅ
ทโ},
|
528 |
-
โๅฅณ็ฅญๅธโ: {โmeaningโ: โ็ด่ฆบใ็ฅ็งใๅ
งๅจๆบๆ
งโ, โdescriptionโ: โไปฃ่กจๅ
งๅจๆบๆ
งๅ็ด่ฆบๆๅผโ},
|
529 |
-
โ็ๅโ: {โmeaningโ: โ่ฑ้ฅใๆฏๆงใๅต้ โ, โdescriptionโ: โ่ฑกๅพตๆฏๆง่ฝ้ๅๅต้ ๅโ},
|
530 |
-
โ็ๅธโ: {โmeaningโ: โๆฌๅจใ็ตๆงใๆงๅถโ, โdescriptionโ: โไปฃ่กจๆฌๅจๅ็งฉๅบโ},
|
531 |
-
โๆ็โ: {โmeaningโ: โ้ๆงๆๅฐใๅณ็ตฑโ, โdescriptionโ: โๆไพ็ฒพ็ฅๆๅฐๅๆบๆ
งโ},
|
532 |
-
โๆไบบโ: {โmeaningโ: โๆๆ
ใ้ไฟใ้ธๆโ, โdescriptionโ: โ่ฑกๅพตๆๆ
ๅ้่ฆ้ธๆโ},
|
533 |
-
โๆฐ่ปโ: {โmeaningโ: โๅๅฉใๆๅฟๅใๆงๅถโ, โdescriptionโ: โ้้ๆฑบๅฟ็ฒๅพๅๅฉโ},
|
534 |
-
โๅ้โ: {โmeaningโ: โๅ
งๅจๅ้ใๅๆฐฃโ, โdescriptionโ: โ่ฑกๅพตๅ
งๅจๅๆฐฃๅๆบซๆๅ้โ},
|
535 |
-
โ้ฑ่
โ: {โmeaningโ: โๅ
ง็ใๅฐๆพใๆบๆ
งโ, โdescriptionโ: โไปฃ่กจๅ
งๅจๆข็ดขๅๆบๆ
งๅฐๆฑโ},
|
536 |
-
โๅฝ้ไน่ผชโ: {โmeaningโ: โๅฝ้ใๅพช็ฐใ่ฎๅโ, โdescriptionโ: โ่ฑกๅพต็ๅฝๅพช็ฐๅ่ฝ่ฎโ},
|
537 |
-
โๆญฃ็พฉโ: {โmeaningโ: โๅ
ฌๆญฃใๅนณ่กกใ็็โ, โdescriptionโ: โไปฃ่กจๅ
ฌๅนณๅ้ๅพท้ธๆโ},
|
538 |
-
โๅๅไบบโ: {โmeaningโ: โ็ง็ฒใๆซๅใๆฐ่ฆ่งโ, โdescriptionโ: โ้้ๆพไธ็ฒๅพๆฐๆดๅฏโ},
|
539 |
-
โๆญป็ฅโ: {โmeaningโ: โ่ฝ่ฎใ็ตๆใ้็โ, โdescriptionโ: โไปฃ่กจ็ตๆๅๆฐ้ๅงโ},
|
540 |
-
โ็ฏๅถโ: {โmeaningโ: โๅนณ่กกใ่ๅฟใ่ๅโ, โdescriptionโ: โๆๅฐๅนณ่กกๅ้ฉๅบฆโ},
|
541 |
-
โๆก้ญโ: {โmeaningโ: โๆ็ธใ่ชๆใๆ็ฎโ, โdescriptionโ: โ่ฑกๅพตๅ
งๅจๆๆผๅๆ็ธโ},
|
542 |
-
โๅกโ: {โmeaningโ: โ็ช็ถ่ฎๅใ็ ดๅฃใ่ฆบ้โ, โdescriptionโ: โไปฃ่กจ็ช็ถ่ฆบ้ๅ่ฝ่ฎโ},
|
543 |
-
โๆๆโ: {โmeaningโ: โๅธๆใ้ๆใๆฒป็โ, โdescriptionโ: โ่ฑกๅพตๅธๆๅๆๅผโ},
|
544 |
-
โๆไบฎโ: {โmeaningโ: โๅนป่ฑกใ็ด่ฆบใๆฝๆ่ญโ, โdescriptionโ: โไปฃ่กจๆฝๆ่ญๅ็ด่ฆบโ},
|
545 |
-
โๅคช้ฝโ: {โmeaningโ: โๆๅใๅๆ
ใๆดปๅโ, โdescriptionโ: โ่ฑกๅพตๆๅๅๆญฃ่ฝ้โ},
|
546 |
-
โๅฏฉๅคโ: {โmeaningโ: โ้็ใๅ
งๅจๅผๅโ, โdescriptionโ: โไปฃ่กจ้ๆง่ฆบ้ๅ้็โ},
|
547 |
-
โไธ็โ: {โmeaningโ: โๅฎๆใๆๅฐฑใๆปฟ่ถณโ, โdescriptionโ: โไปฃ่กจ็ฎๆจ้ๆๅๅๆปฟโ}
|
548 |
-
}
|
549 |
|
550 |
-
|
551 |
-
โโโๆ นๆ็ถๅ่ช่จ็ฒๅๅก็พ
็ๆธๆโโโ
|
552 |
-
if st.session_state.language == โzhโ:
|
553 |
-
return TAROT_CARDS_ZH
|
554 |
-
else:
|
555 |
-
return TAROT_CARDS_EN
|
556 |
|
557 |
-
|
|
|
558 |
|
559 |
-
|
560 |
-
|
561 |
-
|
|
|
562 |
|
563 |
```
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
570 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
571 |
|
572 |
-
|
573 |
-
|
574 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
575 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
576 |
|
577 |
-
#
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
<
|
583 |
-
<
|
584 |
-
|
585 |
-
<
|
586 |
-
<div style="font-size: 1.3rem; margin: 2rem 0; opacity: 0.9;">
|
587 |
-
{get_text(โfeatures_descโ)}
|
588 |
</div>
|
589 |
-
|
|
|
|
|
|
|
|
1 |
import streamlit as st
|
|
|
2 |
import random
|
3 |
+
from datetime import datetime
|
4 |
+
|
5 |
+
# ้ ้ข้
็ฝฎ
|
6 |
+
|
7 |
+
st.set_page_config(
|
8 |
+
page_title=โSoulCompass - Find Your Inner North Starโ,
|
9 |
+
page_icon=โ๐งญโ,
|
10 |
+
layout=โwideโ
|
11 |
+
)
|
12 |
|
13 |
+
# ่ช่จ้
็ฝฎ
|
14 |
|
15 |
LANGUAGES = {
|
16 |
+
โEnglishโ: โenโ,
|
17 |
+
โไธญๆโ: โzhโ,
|
18 |
+
โEspaรฑolโ: โesโ,
|
19 |
+
โFranรงaisโ: โfrโ
|
|
|
|
|
|
|
|
|
20 |
}
|
21 |
|
22 |
+
# ๅค่ช่จๆๆฌ
|
23 |
|
24 |
+
TEXTS = {
|
25 |
โenโ: {
|
26 |
+
โtitleโ: โSoulCompassโ,
|
27 |
+
โsubtitleโ: โFind Your Inner North Starโ,
|
28 |
+
โfeaturesโ: โTarot Reading | Numerology | Soul Journal | AI Therapistโ,
|
29 |
+
โtarot_tabโ: โTarot Readingโ,
|
30 |
+
โnumerology_tabโ: โNumerologyโ,
|
31 |
+
โjournal_tabโ: โSoul Journalโ,
|
32 |
+
โai_tabโ: โAI Therapistโ,
|
33 |
+
โquestion_labelโ: โPlease describe your question in detailโ,
|
34 |
+
โquestion_placeholderโ: โExample: Iโm facing difficulties at work and donโt know which path to choose nextโฆโ,
|
35 |
+
โstart_readingโ: โStart Tarot Readingโ,
|
36 |
+
โquota_textโ: โDaily Free Readingsโ,
|
37 |
+
โquota_exceededโ: โDaily free quota exceeded! Come back tomorrowโ,
|
38 |
+
โreading_completeโ: โYour tarot reading is complete!โ,
|
39 |
+
โmood_scoreโ: โTodayโs mood scoreโ,
|
40 |
+
โenergy_levelโ: โEnergy levelโ,
|
41 |
+
โsave_journalโ: โSave Todayโs Journalโ,
|
42 |
+
โjournal_savedโ: โJournal saved! Another precious record added to your growth journeyโ
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
},
|
44 |
+
โzhโ: {
|
45 |
+
โtitleโ: โSoulCompass ๅฟ้็พ
็คโ,
|
46 |
+
โsubtitleโ: โๆพๅฐๅ
งๅฟ็ๅๆฅตๆโ,
|
47 |
+
โfeaturesโ: โๅก็พ
ๅ ๅ | ๆธๅญๅ ๅ | ๅฟ้ๆฅ่จ | AI็็ๅธซโ,
|
48 |
+
โtarot_tabโ: โๅก็พ
ๅ ๅโ,
|
49 |
+
โnumerology_tabโ: โๆธๅญๅ ๅโ,
|
50 |
+
โjournal_tabโ: โๅฟ้ๆฅ่จโ,
|
51 |
+
โai_tabโ: โAI็็ๅธซโ,
|
52 |
+
โquestion_labelโ: โ่ซ่ฉณ็ดฐๆ่ฟฐๆจๆณ่ฆๅ ๅ็ๅ้กโ,
|
53 |
+
โquestion_placeholderโ: โไพๅฆ๏ผๆๆ่ฟๅจๅทฅไฝไธ้ๅฐๅฐ้ฃ๏ผไธ็ฅ้่ฉฒๅฆไฝ้ธๆไธไธๆญฅโฆโ,
|
54 |
+
โstart_readingโ: โ้ๅงๅก็พ
ๅ ๅโ,
|
55 |
+
โquota_textโ: โๆฏๆฅๅ
่ฒปๅ ๅๆฌกๆธโ,
|
56 |
+
โquota_exceededโ: โไปๆฅๅ
่ฒป้กๅบฆๅทฒ็จๅฎ๏ผๆๅคฉๅไพโ,
|
57 |
+
โreading_completeโ: โๆจ็ๅก็พ
ๅ ๅๅทฒๅฎๆ๏ผโ,
|
58 |
+
โmood_scoreโ: โไปๆฅๅฟๆ
ๆๆธโ,
|
59 |
+
โenergy_levelโ: โ่ฝ้ๆฐดๅนณโ,
|
60 |
+
โsave_journalโ: โไฟๅญไปๆฅๆฅ่จโ,
|
61 |
+
โjournal_savedโ: โๆฅ่จๅทฒไฟๅญ๏ผๆจ็ๆ้ท่ป่ทกๅๅขๅ ไบ็่ฒด็่จ้โ
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
}
|
|
|
|
|
63 |
}
|
64 |
|
65 |
+
# ๅก็พ
็ๆธๆ
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
|
67 |
+
TAROT_CARDS = {
|
68 |
+
โThe Foolโ: {
|
69 |
+
โmeaningโ: โNew beginnings, adventure, innocenceโ,
|
70 |
+
โdescriptionโ: โRepresents the beginning of a life journey, symbolizing infinite possibilitiesโ
|
71 |
+
},
|
72 |
+
โThe Magicianโ: {
|
73 |
+
โmeaningโ: โCreativity, skill, willpowerโ,
|
74 |
+
โdescriptionโ: โHas all the tools needed to achieve goalsโ
|
75 |
+
},
|
76 |
+
โThe High Priestessโ: {
|
77 |
+
โmeaningโ: โIntuition, mystery, inner wisdomโ,
|
78 |
+
โdescriptionโ: โRepresents inner wisdom and intuitive guidanceโ
|
79 |
+
},
|
80 |
+
โThe Empressโ: {
|
81 |
+
โmeaningโ: โFertility, motherhood, creationโ,
|
82 |
+
โdescriptionโ: โSymbolizes maternal energy and creativityโ
|
83 |
+
},
|
84 |
+
โThe Emperorโ: {
|
85 |
+
โmeaningโ: โAuthority, structure, controlโ,
|
86 |
+
โdescriptionโ: โRepresents authority and orderโ
|
87 |
+
},
|
88 |
+
โThe Hierophantโ: {
|
89 |
+
โmeaningโ: โSpiritual guidance, traditionโ,
|
90 |
+
โdescriptionโ: โProvides spiritual guidance and wisdomโ
|
91 |
+
},
|
92 |
+
โThe Loversโ: {
|
93 |
+
โmeaningโ: โLove, relationships, choicesโ,
|
94 |
+
โdescriptionโ: โSymbolizes love and important choicesโ
|
95 |
+
},
|
96 |
+
โThe Chariotโ: {
|
97 |
+
โmeaningโ: โVictory, willpower, controlโ,
|
98 |
+
โdescriptionโ: โAchieving victory through determinationโ
|
99 |
+
},
|
100 |
+
โStrengthโ: {
|
101 |
+
โmeaningโ: โInner strength, courageโ,
|
102 |
+
โdescriptionโ: โSymbolizes inner courage and gentle strengthโ
|
103 |
+
},
|
104 |
+
โThe Hermitโ: {
|
105 |
+
โmeaningโ: โIntrospection, searching, wisdomโ,
|
106 |
+
โdescriptionโ: โRepresents inner exploration and seeking wisdomโ
|
107 |
+
},
|
108 |
+
โWheel of Fortuneโ: {
|
109 |
+
โmeaningโ: โFate, cycles, changeโ,
|
110 |
+
โdescriptionโ: โSymbolizes life cycles and transformationโ
|
111 |
+
},
|
112 |
+
โJusticeโ: {
|
113 |
+
โmeaningโ: โFairness, balance, truthโ,
|
114 |
+
โdescriptionโ: โRepresents fairness and moral choicesโ
|
115 |
+
},
|
116 |
+
โThe Hanged Manโ: {
|
117 |
+
โmeaningโ: โSacrifice, pause, new perspectiveโ,
|
118 |
+
โdescriptionโ: โGaining new insights through letting goโ
|
119 |
+
},
|
120 |
+
โDeathโ: {
|
121 |
+
โmeaningโ: โTransformation, endings, rebirthโ,
|
122 |
+
โdescriptionโ: โRepresents endings and new beginningsโ
|
123 |
+
},
|
124 |
+
โTemperanceโ: {
|
125 |
+
โmeaningโ: โBalance, patience, harmonyโ,
|
126 |
+
โdescriptionโ: โTeaching balance and moderationโ
|
127 |
+
},
|
128 |
+
โThe Devilโ: {
|
129 |
+
โmeaningโ: โBondage, temptation, addictionโ,
|
130 |
+
โdescriptionโ: โSymbolizes inner fears and bondageโ
|
131 |
+
},
|
132 |
+
โThe Towerโ: {
|
133 |
+
โmeaningโ: โSudden change, destruction, awakeningโ,
|
134 |
+
โdescriptionโ: โRepresents sudden awakening and transformationโ
|
135 |
+
},
|
136 |
+
โThe Starโ: {
|
137 |
+
โmeaningโ: โHope, inspiration, healingโ,
|
138 |
+
โdescriptionโ: โSymbolizes hope and guidanceโ
|
139 |
+
},
|
140 |
+
โThe Moonโ: {
|
141 |
+
โmeaningโ: โIllusion, intuition, subconsciousโ,
|
142 |
+
โdescriptionโ: โRepresents subconscious and intuitionโ
|
143 |
+
},
|
144 |
+
โThe Sunโ: {
|
145 |
+
โmeaningโ: โSuccess, joy, vitalityโ,
|
146 |
+
โdescriptionโ: โSymbolizes success and positive energyโ
|
147 |
+
},
|
148 |
+
โJudgementโ: {
|
149 |
+
โmeaningโ: โRebirth, inner callingโ,
|
150 |
+
โdescriptionโ: โRepresents spiritual awakening and rebirthโ
|
151 |
+
},
|
152 |
+
โThe Worldโ: {
|
153 |
+
โmeaningโ: โCompletion, achievement, fulfillmentโ,
|
154 |
+
โdescriptionโ: โRepresents goal achievement and completionโ
|
155 |
+
}
|
156 |
+
}
|
157 |
|
158 |
+
# ๅๅงๅๆ่ฉฑ็ๆ
|
|
|
159 |
|
160 |
if โdaily_usageโ not in st.session_state:
|
161 |
st.session_state.daily_usage = 0
|
162 |
|
163 |
+
if โlanguageโ not in st.session_state:
|
164 |
+
st.session_state.language = โenโ
|
165 |
|
166 |
if โjournal_entriesโ not in st.session_state:
|
167 |
st.session_state.journal_entries = []
|
168 |
|
169 |
def get_text(key):
|
170 |
โโโ็ฒๅ็ถๅ่ช่จ็ๆๆฌโโโ
|
171 |
+
return TEXTS[st.session_state.language].get(key, key)
|
|
|
|
|
|
|
|
|
|
|
|
|
172 |
|
173 |
+
def change_language():
|
174 |
+
โโโ่ช่จๅๆโโโ
|
175 |
+
lang_names = list(LANGUAGES.keys())
|
176 |
+
lang_codes = list(LANGUAGES.values())
|
177 |
|
178 |
+
```
|
179 |
+
current_index = 0
|
180 |
+
if st.session_state.language in lang_codes:
|
181 |
+
current_index = lang_codes.index(st.session_state.language)
|
182 |
+
|
183 |
+
selected_lang_name = st.selectbox(
|
184 |
+
"Language / ่ช่จ",
|
185 |
+
lang_names,
|
186 |
+
index=current_index
|
187 |
+
)
|
188 |
|
189 |
+
new_lang_code = LANGUAGES[selected_lang_name]
|
190 |
+
if new_lang_code != st.session_state.language:
|
191 |
+
st.session_state.language = new_lang_code
|
192 |
+
st.rerun()
|
193 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
|
195 |
+
# CSSๆจฃๅผ
|
196 |
+
|
197 |
+
st.markdown(โโโ
|
198 |
+
|
199 |
+
<style>
|
200 |
+
.main-header {
|
201 |
text-align: center;
|
202 |
+
background: linear-gradient(135deg, #6366F1 0%, #C084FC 100%);
|
203 |
color: white;
|
204 |
+
padding: 3rem 2rem;
|
205 |
border-radius: 20px;
|
206 |
margin-bottom: 2rem;
|
207 |
box-shadow: 0 20px 40px rgba(99, 102, 241, 0.3);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
208 |
}
|
209 |
|
210 |
+
.main-header h1 {
|
211 |
+
font-size: 3.5rem;
|
|
|
|
|
|
|
|
|
|
|
|
|
212 |
font-weight: 600;
|
213 |
margin-bottom: 1rem;
|
214 |
text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
|
|
|
|
|
215 |
}
|
216 |
|
217 |
.compass-icon {
|
218 |
+
font-size: 4rem;
|
219 |
margin-bottom: 1rem;
|
220 |
display: inline-block;
|
221 |
animation: compass-spin 3s ease-in-out infinite;
|
|
|
226 |
50% { transform: rotate(10deg); }
|
227 |
}
|
228 |
|
229 |
+
.tarot-card {
|
230 |
+
background: linear-gradient(135deg, #1E3A8A 0%, #6366F1 100%);
|
231 |
+
border: 3px solid #F59E0B;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
232 |
border-radius: 20px;
|
233 |
padding: 2rem;
|
234 |
color: white;
|
235 |
text-align: center;
|
236 |
+
margin: 1rem;
|
237 |
box-shadow: 0 15px 35px rgba(0,0,0,0.3);
|
238 |
transition: all 0.4s ease;
|
|
|
|
|
|
|
|
|
|
|
239 |
}
|
240 |
|
241 |
+
.tarot-card:hover {
|
242 |
+
transform: translateY(-5px) scale(1.02);
|
|
|
|
|
|
|
|
|
|
|
243 |
}
|
244 |
|
245 |
+
.reading-result {
|
246 |
+
background: linear-gradient(135deg, #6366F1 0%, #C084FC 100%);
|
|
|
|
|
|
|
|
|
|
|
247 |
color: white;
|
248 |
+
padding: 2.5rem;
|
249 |
border-radius: 20px;
|
250 |
margin: 2rem 0;
|
251 |
box-shadow: 0 15px 35px rgba(99, 102, 241, 0.3);
|
|
|
252 |
}
|
253 |
|
254 |
+
.quota-display {
|
255 |
+
background: linear-gradient(135deg, #F59E0B 0%, #FB923C 100%);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
256 |
color: white;
|
257 |
+
padding: 1rem 2rem;
|
258 |
border-radius: 50px;
|
259 |
text-align: center;
|
260 |
font-weight: 600;
|
|
|
|
|
261 |
margin: 2rem auto;
|
262 |
+
max-width: 400px;
|
263 |
}
|
264 |
|
265 |
+
.feature-card {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
266 |
background: white;
|
|
|
267 |
border-radius: 15px;
|
|
|
268 |
padding: 2rem;
|
269 |
+
box-shadow: 0 4px 15px rgba(0,0,0,0.1);
|
270 |
+
border: 2px solid transparent;
|
271 |
transition: all 0.3s ease;
|
272 |
+
height: 100%;
|
273 |
}
|
274 |
|
275 |
+
.feature-card:hover {
|
276 |
+
border-color: #6366F1;
|
277 |
+
transform: translateY(-2px);
|
278 |
}
|
279 |
|
280 |
+
.journal-entry {
|
281 |
+
background: #F8FAFC;
|
282 |
+
border-radius: 10px;
|
283 |
+
padding: 1.5rem;
|
284 |
+
margin: 1rem 0;
|
285 |
+
border-left: 4px solid #6366F1;
|
286 |
}
|
287 |
|
288 |
+
.ai-response {
|
289 |
+
background: linear-gradient(135deg, #E0E7FF 0%, #F3E8FF 100%);
|
290 |
+
border-radius: 15px;
|
291 |
+
padding: 1.5rem;
|
292 |
+
margin: 1rem 0;
|
293 |
+
border-left: 4px solid #6366F1;
|
294 |
}
|
295 |
+
</style>
|
296 |
+
|
297 |
+
โโโ, unsafe_allow_html=True)
|
298 |
+
|
299 |
+
# ่ช่จ้ธๆๅจ
|
300 |
+
|
301 |
+
col1, col2, col3 = st.columns([2, 1, 1])
|
302 |
+
with col3:
|
303 |
+
change_language()
|
304 |
+
|
305 |
+
# ไธปๆจ้ก
|
306 |
+
|
307 |
+
header_html = fโโโ
|
308 |
+
|
309 |
+
<div class="main-header">
|
310 |
+
<div class="compass-icon">๐งญ</div>
|
311 |
+
<h1>{get_text('title')}</h1>
|
312 |
+
<h2 style="font-size: 2rem; margin: 1rem 0;">{get_text('subtitle')}</h2>
|
313 |
+
<p style="font-size: 1.2rem; opacity: 0.9;">{get_text('features')}</p>
|
314 |
+
<div style="margin-top: 20px;">
|
315 |
+
<span style="background: rgba(255,255,255,0.2); padding: 8px 16px; border-radius: 20px; margin: 0 10px;">
|
316 |
+
โญ 15,247 users
|
317 |
+
</span>
|
318 |
+
<span style="background: rgba(255,255,255,0.2); padding: 8px 16px; border-radius: 20px; margin: 0 10px;">
|
319 |
+
๐ฏ 4.9/5 rating
|
320 |
+
</span>
|
321 |
+
</div>
|
322 |
+
</div>
|
323 |
+
"""
|
324 |
+
st.markdown(header_html, unsafe_allow_html=True)
|
325 |
+
|
326 |
+
# ๅฉ้ค้กๅบฆ้กฏ็คบ
|
327 |
+
|
328 |
+
remaining = 5 - st.session_state.daily_usage
|
329 |
+
quota_html = fโโโ
|
330 |
+
|
331 |
+
<div class="quota-display">
|
332 |
+
๐ซ {get_text('quota_text')}: {remaining}/5
|
333 |
+
</div>
|
334 |
+
"""
|
335 |
+
st.markdown(quota_html, unsafe_allow_html=True)
|
336 |
+
|
337 |
+
# ไธปๅ่ฝๅๅ
|
338 |
+
|
339 |
+
tab1, tab2, tab3, tab4 = st.tabs([
|
340 |
+
fโ๐ฎ {get_text(โtarot_tabโ)}โ,
|
341 |
+
fโ๐ข {get_text(โnumerology_tabโ)}โ,
|
342 |
+
fโ๐ {get_text(โjournal_tabโ)}โ,
|
343 |
+
fโ๐ค {get_text(โai_tabโ)}โ
|
344 |
+
])
|
345 |
+
|
346 |
+
# ๅก็พ
ๅ ๅๆจ็ฑค
|
347 |
|
348 |
+
with tab1:
|
349 |
+
st.header(fโ๐ฎ {get_text(โtarot_tabโ)}โ)
|
350 |
+
st.markdown(โ*Let ancient tarot wisdom guide your lifeโs direction*โ)
|
351 |
+
|
352 |
+
```
|
353 |
+
question = st.text_area(
|
354 |
+
get_text('question_label'),
|
355 |
+
placeholder=get_text('question_placeholder'),
|
356 |
+
height=100
|
357 |
+
)
|
358 |
+
|
359 |
+
if question:
|
360 |
+
col1, col2 = st.columns(2)
|
361 |
|
362 |
+
with col1:
|
363 |
+
spread_type = st.selectbox(
|
364 |
+
"Choose Tarot Spread",
|
365 |
+
["Single Card - Quick Guidance", "Three Cards - Past Present Future", "Love Triangle - Relationship Focus"]
|
366 |
+
)
|
367 |
|
368 |
+
with col2:
|
369 |
+
spread_info = {
|
370 |
+
"Single Card - Quick Guidance": "Perfect for daily guidance and simple questions",
|
371 |
+
"Three Cards - Past Present Future": "Timeline reading to understand development",
|
372 |
+
"Love Triangle - Relationship Focus": "Specialized for relationship questions"
|
373 |
+
}
|
374 |
+
st.info(spread_info[spread_type])
|
375 |
|
376 |
+
if st.button(get_text('start_reading'), type="primary", use_container_width=True):
|
377 |
+
if st.session_state.daily_usage >= 5:
|
378 |
+
st.error(get_text('quota_exceeded'))
|
379 |
+
else:
|
380 |
+
st.session_state.daily_usage += 1
|
381 |
+
|
382 |
+
with st.spinner("๐ Drawing tarot cards for you..."):
|
383 |
+
import time
|
384 |
+
time.sleep(2)
|
385 |
+
|
386 |
+
# ๆฝ็้่ผฏ
|
387 |
+
num_cards = 1 if "Single" in spread_type else 3
|
388 |
+
drawn_cards = random.sample(list(TAROT_CARDS.keys()), num_cards)
|
389 |
+
|
390 |
+
st.success(f"โจ {get_text('reading_complete')}")
|
391 |
+
|
392 |
+
# ้กฏ็คบๆฝๅฐ็็
|
393 |
+
cols = st.columns(len(drawn_cards))
|
394 |
+
for i, card in enumerate(drawn_cards):
|
395 |
+
with cols[i]:
|
396 |
+
is_reversed = random.choice([True, False])
|
397 |
+
status = "Reversed" if is_reversed else "Upright"
|
398 |
+
card_html = f"""
|
399 |
+
<div class="tarot-card">
|
400 |
+
<h3>{card}</h3>
|
401 |
+
<p><strong>{status}</strong></p>
|
402 |
+
<p style="font-size: 0.9rem; opacity: 0.8;">{TAROT_CARDS[card]['meaning']}</p>
|
403 |
+
</div>
|
404 |
+
"""
|
405 |
+
st.markdown(card_html, unsafe_allow_html=True)
|
406 |
+
|
407 |
+
# ็ๆ่งฃ่ฎ
|
408 |
+
reading_text = f"""
|
409 |
```
|
410 |
|
411 |
+
๐ฎ **SoulCompass Reading for You**
|
412 |
|
413 |
+
**Your Question:** {question}
|
414 |
+
**Spread Used:** {spread_type}
|
415 |
+
**Cards Drawn:** {โ, โ.join(drawn_cards)}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
416 |
|
417 |
+
**Detailed Interpretation:**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
418 |
|
419 |
+
{chr(10).join([fโ**{card}:** {TAROT_CARDS[card][โdescriptionโ]}โ for card in drawn_cards])}
|
|
|
|
|
|
|
|
|
|
|
420 |
|
421 |
+
**Overall Guidance:**
|
422 |
+
The cards reveal important insights about your situation. Trust your intuition as you move forward, and remember that you have the wisdom within you to make the right choices.
|
423 |
|
424 |
+
๐ **Key Message:** Embrace the journey ahead with confidence and openness to new possibilities.
|
425 |
+
|
426 |
+
๐ซ **Readings used today:** {st.session_state.daily_usage}/5
|
427 |
+
โโโ
|
428 |
|
429 |
```
|
430 |
+
reading_html = f"""
|
431 |
+
<div class="reading-result">
|
432 |
+
{reading_text.replace(chr(10), '<br>')}
|
433 |
+
</div>
|
434 |
+
"""
|
435 |
+
st.markdown(reading_html, unsafe_allow_html=True)
|
436 |
+
```
|
437 |
+
|
438 |
+
# ๆธๅญๅ ๅๆจ็ฑค
|
439 |
+
|
440 |
+
with tab2:
|
441 |
+
st.header(fโ๐ข {get_text(โnumerology_tabโ)}โ)
|
442 |
+
st.markdown(โ*Discover your lifeโs mysteries through the power of numbers*โ)
|
443 |
+
|
444 |
+
```
|
445 |
+
col1, col2 = st.columns(2)
|
446 |
+
|
447 |
+
with col1:
|
448 |
+
st.subheader("๐
Life Path Number")
|
449 |
+
birth_date = st.date_input("Select your birth date")
|
450 |
+
|
451 |
+
if birth_date and st.button("๐ Calculate Life Number"):
|
452 |
+
# ็ๅฝ้ๆธ่จ็ฎ
|
453 |
+
date_str = birth_date.strftime('%Y%m%d')
|
454 |
+
total = sum(int(digit) for digit in date_str if digit.isdigit())
|
455 |
+
while total > 9 and total not in [11, 22, 33]:
|
456 |
+
total = sum(int(digit) for digit in str(total))
|
457 |
+
|
458 |
+
life_meanings = {
|
459 |
+
1: "The Leader - Independent, pioneering, ambitious",
|
460 |
+
2: "The Cooperator - Diplomatic, peaceful, intuitive",
|
461 |
+
3: "The Communicator - Creative, expressive, optimistic",
|
462 |
+
4: "The Builder - Practical, disciplined, hardworking",
|
463 |
+
5: "The Freedom Seeker - Adventurous, energetic, curious",
|
464 |
+
6: "The Nurturer - Caring, responsible, family-oriented",
|
465 |
+
7: "The Seeker - Analytical, introspective, spiritual",
|
466 |
+
8: "The Achiever - Ambitious, organized, business-minded",
|
467 |
+
9: "The Humanitarian - Compassionate, generous, idealistic"
|
468 |
+
}
|
469 |
+
|
470 |
+
meaning = life_meanings.get(total, "Master Number - Special spiritual significance")
|
471 |
+
|
472 |
+
result_html = f"""
|
473 |
+
<div class="feature-card">
|
474 |
+
<h3>๐ Your Life Path Number: {total}</h3>
|
475 |
+
<p><strong>{meaning}</strong></p>
|
476 |
+
<p>This number represents your core personality traits and life lessons.
|
477 |
+
It reveals the path you're meant to walk in this lifetime.</p>
|
478 |
+
</div>
|
479 |
+
"""
|
480 |
+
st.markdown(result_html, unsafe_allow_html=True)
|
481 |
+
|
482 |
+
with col2:
|
483 |
+
st.subheader("๐ Name Numerology")
|
484 |
+
name = st.text_input("Enter your full name")
|
485 |
+
|
486 |
+
if name and st.button("โจ Analyze Name Number"):
|
487 |
+
# ็ฐกๅ็ๅงๅๆธๅญ่จ็ฎ
|
488 |
+
name_value = len(name) % 9 + 1
|
489 |
+
|
490 |
+
name_meanings = {
|
491 |
+
1: "Leadership Energy - You inspire others naturally",
|
492 |
+
2: "Harmony Energy - You bring peace and cooperation",
|
493 |
+
3: "Creative Energy - You express joy and optimism",
|
494 |
+
4: "Stability Energy - You provide structure and reliability",
|
495 |
+
5: "Freedom Energy - You bring change and adventure",
|
496 |
+
6: "Nurturing Energy - You care for and support others",
|
497 |
+
7: "Wisdom Energy - You seek deeper understanding",
|
498 |
+
8: "Success Energy - You achieve material accomplishment",
|
499 |
+
9: "Service Energy - You serve the greater good"
|
500 |
+
}
|
501 |
+
|
502 |
+
meaning = name_meanings[name_value]
|
503 |
+
|
504 |
+
result_html = f"""
|
505 |
+
<div class="feature-card">
|
506 |
+
<h3>โจ Your Name Number: {name_value}</h3>
|
507 |
+
<p><strong>{meaning}</strong></p>
|
508 |
+
<p>Your name carries this vibrational energy that influences how others
|
509 |
+
perceive you and how you express yourself in the world.</p>
|
510 |
+
</div>
|
511 |
+
"""
|
512 |
+
st.markdown(result_html, unsafe_allow_html=True)
|
513 |
+
```
|
514 |
+
|
515 |
+
# ๅฟ้ๆฅ่จๆจ็ฑค
|
516 |
+
|
517 |
+
with tab3:
|
518 |
+
st.header(fโ๐ {get_text(โjournal_tabโ)}โ)
|
519 |
+
st.markdown(โ*Track your emotional journey and connect with your inner self*โ)
|
520 |
+
|
521 |
+
```
|
522 |
+
# ไปๆฅๅฟๆ
่จ้
|
523 |
+
st.subheader("๐ Today's Mood Record")
|
524 |
+
|
525 |
+
col1, col2 = st.columns(2)
|
526 |
+
|
527 |
+
with col1:
|
528 |
+
mood_score = st.slider(get_text('mood_score'), 1, 10, 7)
|
529 |
+
main_emotion = st.selectbox(
|
530 |
+
"Primary emotion",
|
531 |
+
["๐ Happy", "๐ Sad", "๐ฐ Anxious", "๐ก Angry", "๐ Calm", "๐ค Grateful", "๐ด Tired", "๐ค Confused"]
|
532 |
)
|
533 |
+
|
534 |
+
with col2:
|
535 |
+
energy_level = st.slider(get_text('energy_level'), 1, 10, 6)
|
536 |
+
gratitude = st.text_input("What are you grateful for today?", placeholder="Something that made you smile today...")
|
537 |
+
|
538 |
+
# ๆฅ่จๅ
งๅฎน
|
539 |
+
journal_content = st.text_area(
|
540 |
+
"๐ Today's Soul Journal Entry",
|
541 |
+
placeholder="Write about your thoughts, feelings, experiences, or anything you want to record today...",
|
542 |
+
height=150
|
543 |
+
)
|
544 |
+
|
545 |
+
if st.button(get_text('save_journal'), type="primary"):
|
546 |
+
if journal_content:
|
547 |
+
entry = {
|
548 |
+
'date': datetime.now().strftime('%Y-%m-%d'),
|
549 |
+
'time': datetime.now().strftime('%H:%M'),
|
550 |
+
'mood': mood_score,
|
551 |
+
'emotion': main_emotion,
|
552 |
+
'energy': energy_level,
|
553 |
+
'gratitude': gratitude,
|
554 |
+
'content': journal_content
|
555 |
+
}
|
556 |
+
|
557 |
+
st.session_state.journal_entries.append(entry)
|
558 |
+
st.success(get_text('journal_saved'))
|
559 |
+
st.balloons()
|
560 |
+
else:
|
561 |
+
st.warning("Please write something in your journal entry")
|
562 |
+
|
563 |
+
# ้กฏ็คบๆ่ฟ็ๆฅ่จ่จ้
|
564 |
+
if st.session_state.journal_entries:
|
565 |
+
st.subheader("๐ Recent Journal Entries")
|
566 |
|
567 |
+
for entry in reversed(st.session_state.journal_entries[-3:]): # ้กฏ็คบๆ่ฟ3ๆข
|
568 |
+
entry_html = f"""
|
569 |
+
<div class="journal-entry">
|
570 |
+
<div style="display: flex; justify-content: space-between; align-items: center;">
|
571 |
+
<strong>{entry['date']} {entry['time']}</strong>
|
572 |
+
<span>{entry['emotion']} | Mood: {entry['mood']}/10 | Energy: {entry['energy']}/10</span>
|
573 |
+
</div>
|
574 |
+
<p style="margin: 10px 0;"><strong>Grateful for:</strong> {entry['gratitude']}</p>
|
575 |
+
<p style="margin: 10px 0; font-style: italic;">"{entry['content'][:100]}{'...' if len(entry['content']) > 100 else ''}"</p>
|
576 |
+
</div>
|
577 |
+
"""
|
578 |
+
st.markdown(entry_html, unsafe_allow_html=True)
|
579 |
+
```
|
580 |
+
|
581 |
+
# AI็็ๅธซๆจ็ฑค
|
582 |
+
|
583 |
+
with tab4:
|
584 |
+
st.header(fโ๐ค {get_text(โai_tabโ)}โ)
|
585 |
+
st.markdown(โ*24/7 soul guide providing warm support and guidance*โ)
|
586 |
+
|
587 |
```
|
588 |
+
# AI็็ๅธซไป็ดน
|
589 |
+
ai_intro_html = """
|
590 |
+
<div style="background: linear-gradient(135deg, #F3F4F6 0%, #E5E7EB 100%); padding: 20px; border-radius: 15px; margin: 20px 0;">
|
591 |
+
<div style="display: flex; align-items: center; margin-bottom: 15px;">
|
592 |
+
<div style="font-size: 3rem; margin-right: 15px;">๐ค</div>
|
593 |
+
<div>
|
594 |
+
<h4 style="margin: 0; color: #6366F1;">SoulCompass AI Therapist</h4>
|
595 |
+
<p style="margin: 5px 0; color: #6B7280;">Your dedicated soul guide, always here to provide support and companionship</p>
|
596 |
+
</div>
|
597 |
+
</div>
|
598 |
+
<div style="color: #6B7280; font-size: 0.9rem;">
|
599 |
+
๐ฌ Emotional supportใ๐ง Relaxation guidanceใ๐ฑ Growth adviceใ๐ซ 24/7 companionship
|
600 |
+
</div>
|
601 |
+
</div>
|
602 |
+
"""
|
603 |
+
st.markdown(ai_intro_html, unsafe_allow_html=True)
|
604 |
+
|
605 |
+
# ๅฐ่ฉฑ้กๅ้ธๆ
|
606 |
+
conversation_type = st.selectbox(
|
607 |
+
"๐ฏ Choose conversation topic",
|
608 |
+
[
|
609 |
+
"๐ญ General Soul Conversation",
|
610 |
+
"๐ฐ Stress & Anxiety Support",
|
611 |
+
"๐ Relationship Counseling",
|
612 |
+
"๐ฏ Life Goals Discussion",
|
613 |
+
"๐ง Meditation & Relaxation",
|
614 |
+
"๐ฑ Personal Growth Advice"
|
615 |
+
]
|
616 |
+
)
|
617 |
+
|
618 |
+
# ๅฐ่ฉฑ่ผธๅ
ฅ
|
619 |
+
user_message = st.text_area(
|
620 |
+
"๐ฌ Share your thoughts with the AI Therapist",
|
621 |
+
placeholder="Tell me how you're feeling, or what you'd like to discuss...",
|
622 |
+
height=100
|
623 |
+
)
|
624 |
+
|
625 |
+
if user_message and st.button("๐ซ Start Conversation", type="primary"):
|
626 |
+
with st.spinner("๐ค AI Therapist is listening and preparing a response..."):
|
627 |
+
import time
|
628 |
+
time.sleep(1.5)
|
629 |
+
|
630 |
+
# AIๅๆ็ๆ
|
631 |
+
responses = {
|
632 |
+
"๐ญ General Soul Conversation": [
|
633 |
+
f"Thank you for sharing with me. I can sense that what you've told me - '{user_message}' - comes from a place of genuine reflection. Your willingness to explore your inner world shows great courage.",
|
634 |
+
f"I hear you saying '{user_message}' and I want you to know that your feelings are completely valid. Sometimes the simple act of expressing our thoughts can be the first step toward greater clarity.",
|
635 |
+
f"What you've shared - '{user_message}' - resonates deeply. Every person's journey is unique, and I'm honored that you've chosen to share this part of yours with me."
|
636 |
+
],
|
637 |
+
"๐ฐ Stress & Anxiety Support": [
|
638 |
+
f"I understand you're experiencing stress around '{user_message}'. Anxiety can feel overwhelming, but remember - you've successfully navigated 100% of your difficult days so far. Let's breathe through this together.",
|
639 |
+
f"Your stress about '{user_message}' is completely understandable. Right now, let's focus on what you can control in this moment. Take a deep breath in for 4 counts, hold for 4, and exhale for 6.",
|
640 |
+
f"Thank you for trusting me with your anxiety about '{user_message}'. You're stronger than you realize, and this feeling will pass. Let's find some small steps to help you feel more grounded."
|
641 |
+
],
|
642 |
+
"๐ Relationship Counseling": [
|
643 |
+
f"Relationships can be complex, and what you've shared about '{user_message}' shows how much you care. Love requires both vulnerability and strength - you're showing both right now.",
|
644 |
+
f"I can hear the emotion in your words about '{user_message}'. Relationships are mirrors that help us grow, even when they challenge us. Your heart's capacity for love is a gift.",
|
645 |
+
f"The situation you've described - '{user_message}' - touches on the deep human need for connection. Remember, the relationship you have with yourself sets the foundation for all others."
|
646 |
+
]
|
647 |
+
}
|
648 |
+
|
649 |
+
response_list = responses.get(conversation_type, responses["๐ญ General Soul Conversation"])
|
650 |
+
ai_response = random.choice(response_list)
|
651 |
+
|
652 |
+
# ้กฏ็คบๅฐ่ฉฑ
|
653 |
+
conversation_html = f"""
|
654 |
+
<div style="margin: 20px 0;">
|
655 |
+
<div style="background: #E5E7EB; padding: 15px; border-radius: 15px 15px 5px 15px; margin-bottom: 10px;">
|
656 |
+
<strong>You:</strong> {user_message}
|
657 |
+
</div>
|
658 |
+
<div class="ai-response">
|
659 |
+
<strong>๐ค AI Therapist:</strong> {ai_response}
|
660 |
+
<br><br>
|
661 |
+
<small style="opacity: 0.8;">๐ Remember: I'm here to support you, but for serious mental health concerns, please consult a professional therapist.</small>
|
662 |
+
</div>
|
663 |
+
</div>
|
664 |
+
"""
|
665 |
+
st.markdown(conversation_html, unsafe_allow_html=True)
|
666 |
+
```
|
667 |
+
|
668 |
+
# ้ ่
ณ
|
669 |
+
|
670 |
+
st.markdown(โโโ)
|
671 |
+
footer_html = โโโ
|
672 |
|
673 |
+
<div style="text-align: center; color: #6B7280; padding: 2rem;">
|
674 |
+
<p>๐งญ <strong>SoulCompass</strong> - Find Your Inner North Star</p>
|
675 |
+
<p>Made with โค๏ธ for seekers of wisdom and growth worldwide</p>
|
676 |
+
<div style="margin: 20px 0;">
|
677 |
+
<span style="margin: 0 15px;">๐ง support@soulcompass.ai</span>
|
678 |
+
<span style="margin: 0 15px;">๐ www.soulcompass.ai</span>
|
679 |
+
<span style="margin: 0 15px;">๐ฑ @SoulCompassAI</span>
|
680 |
+
</div>
|
681 |
+
<p>๐ <a href="#" style="color: #6366F1; text-decoration: none;">Upgrade to Pro</a> for unlimited readings and advanced features</p>
|
|
|
|
|
682 |
</div>
|
683 |
+
"""
|
684 |
+
st.markdown(footer_html, unsafe_allow_html=True)
|