Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -29,7 +29,6 @@ st.markdown("""
|
|
29 |
from { opacity: 0; }
|
30 |
to { opacity: 1; }
|
31 |
}
|
32 |
-
|
33 |
.quote-box {
|
34 |
animation: fadeIn 1s ease-in;
|
35 |
border-left: 5px solid #4CAF50;
|
@@ -39,7 +38,6 @@ st.markdown("""
|
|
39 |
border-radius: 10px;
|
40 |
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
|
41 |
}
|
42 |
-
|
43 |
.tip-card {
|
44 |
padding: 15px;
|
45 |
margin: 10px 0;
|
@@ -47,20 +45,17 @@ st.markdown("""
|
|
47 |
border-radius: 10px;
|
48 |
border: 1px solid #ffab40;
|
49 |
}
|
50 |
-
|
51 |
.social-post {
|
52 |
background: #e3f2fd;
|
53 |
padding: 20px;
|
54 |
border-radius: 15px;
|
55 |
margin: 15px 0;
|
56 |
}
|
57 |
-
|
58 |
.nav-btn {
|
59 |
margin: 8px 0;
|
60 |
width: 100%;
|
61 |
transition: all 0.3s ease;
|
62 |
}
|
63 |
-
|
64 |
.nav-btn:hover {
|
65 |
transform: scale(1.02);
|
66 |
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
@@ -97,9 +92,9 @@ if 'page' not in st.session_state:
|
|
97 |
def generate_quote():
|
98 |
prompt = "Create an inspirational quote about self-improvement with 2 emojis"
|
99 |
response = groq_client.chat.completions.create(
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
)
|
104 |
return response.choices[0].message.content
|
105 |
|
@@ -147,9 +142,9 @@ Tone: {tone_instructions[tone]}
|
|
147 |
Max length: 280 characters"""
|
148 |
|
149 |
response = groq_client.chat.completions.create(
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
)
|
154 |
return response.choices[0].message.content
|
155 |
|
|
|
29 |
from { opacity: 0; }
|
30 |
to { opacity: 1; }
|
31 |
}
|
|
|
32 |
.quote-box {
|
33 |
animation: fadeIn 1s ease-in;
|
34 |
border-left: 5px solid #4CAF50;
|
|
|
38 |
border-radius: 10px;
|
39 |
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
|
40 |
}
|
|
|
41 |
.tip-card {
|
42 |
padding: 15px;
|
43 |
margin: 10px 0;
|
|
|
45 |
border-radius: 10px;
|
46 |
border: 1px solid #ffab40;
|
47 |
}
|
|
|
48 |
.social-post {
|
49 |
background: #e3f2fd;
|
50 |
padding: 20px;
|
51 |
border-radius: 15px;
|
52 |
margin: 15px 0;
|
53 |
}
|
|
|
54 |
.nav-btn {
|
55 |
margin: 8px 0;
|
56 |
width: 100%;
|
57 |
transition: all 0.3s ease;
|
58 |
}
|
|
|
59 |
.nav-btn:hover {
|
60 |
transform: scale(1.02);
|
61 |
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
|
|
92 |
def generate_quote():
|
93 |
prompt = "Create an inspirational quote about self-improvement with 2 emojis"
|
94 |
response = groq_client.chat.completions.create(
|
95 |
+
model="mixtral-8x7b-instruct-v0.1", # Updated model
|
96 |
+
messages=[{"role": "user", "content": prompt}],
|
97 |
+
temperature=0.7
|
98 |
)
|
99 |
return response.choices[0].message.content
|
100 |
|
|
|
142 |
Max length: 280 characters"""
|
143 |
|
144 |
response = groq_client.chat.completions.create(
|
145 |
+
model="mixtral-8x7b-instruct-v0.1", # Updated model
|
146 |
+
messages=[{"role": "user", "content": prompt}],
|
147 |
+
temperature=0.9 if tone == "funny" else 0.5
|
148 |
)
|
149 |
return response.choices[0].message.content
|
150 |
|