ShazaAly commited on
Commit
abd993c
·
verified ·
1 Parent(s): 68f17ec

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +145 -1
app.py CHANGED
@@ -41,6 +41,8 @@ summary = (
41
  "tools (e.g., n8n, Copilot, Cursor), and mentoring through technical content. As an ALX alumna, I have a "
42
  "hands-on mindset and a continuous learning attitude. I am also the author of a technical blog on "
43
  "software engineering and AI systems: shazaali.substack.com."
 
 
44
  )
45
 
46
  linkedin_text = "My LinkedIn Profile: https://www.linkedin.com/in/shazaali/\n\n"
@@ -92,7 +94,149 @@ def chat(message, history):
92
 
93
  # We use gr.Blocks() to get more control and apply custom CSS reliably.
94
  with gr.Blocks(theme=cheerful_theme, css="""
95
- .gradio-container { font-size: 18px !important; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96
  """) as interface:
97
  gr.ChatInterface(
98
  fn=chat,
 
41
  "tools (e.g., n8n, Copilot, Cursor), and mentoring through technical content. As an ALX alumna, I have a "
42
  "hands-on mindset and a continuous learning attitude. I am also the author of a technical blog on "
43
  "software engineering and AI systems: shazaali.substack.com."
44
+ "I worked on projects like: Mediconsult, E-commerce, and more. So proud of RAG chatbot I built for suplyd.app"
45
+
46
  )
47
 
48
  linkedin_text = "My LinkedIn Profile: https://www.linkedin.com/in/shazaali/\n\n"
 
94
 
95
  # We use gr.Blocks() to get more control and apply custom CSS reliably.
96
  with gr.Blocks(theme=cheerful_theme, css="""
97
+ /* Increase base font size for the entire app */
98
+ .gradio-container {
99
+ font-size: 18px !important;
100
+ background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ff 100%) !important;
101
+ }
102
+
103
+ /* Make chat messages bigger and more cheerful */
104
+ .message-wrap { font-size: 20px !important; }
105
+ .user-message { background-color: #f0e6ff !important; border-radius: 18px !important; }
106
+ .bot-message { background-color: #f9f5ff !important; border-radius: 18px !important; }
107
+
108
+ /* Add a subtle bounce animation to messages */
109
+ @keyframes bounce {
110
+ 0% { transform: translateY(0); }
111
+ 20% { transform: translateY(-10px); }
112
+ 40% { transform: translateY(0); }
113
+ }
114
+ .message:last-child {
115
+ animation: bounce 1s ease;
116
+ }
117
+
118
+ /* Make the title and description bigger and more colorful */
119
+ h1 {
120
+ font-size: 36px !important;
121
+ font-weight: 700 !important;
122
+ margin-bottom: 16px !important;
123
+ background: linear-gradient(90deg, #9333ea, #e879f9);
124
+ -webkit-background-clip: text;
125
+ -webkit-text-fill-color: transparent;
126
+ text-shadow: 0px 2px 4px rgba(0,0,0,0.1);
127
+ }
128
+ h2, h3 { font-size: 24px !important; color: #9333ea !important; }
129
+
130
+ /* Make buttons bigger and more cheerful */
131
+ button {
132
+ font-size: 18px !important;
133
+ padding: 12px 20px !important;
134
+ border-radius: 12px !important;
135
+ transition: all 0.3s ease !important;
136
+ }
137
+ button:hover {
138
+ transform: translateY(-3px) !important;
139
+ box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
140
+ }
141
+
142
+ /* Make input box MUCH bigger and friendlier */
143
+ textarea, .chat-input-row textarea {
144
+ font-size: 24px !important;
145
+ line-height: 1.5 !important;
146
+ padding: 16px !important;
147
+ min-height: 100px !important;
148
+ border-radius: 16px !important;
149
+ border: 2px solid #d8b4fe !important;
150
+ box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
151
+ transition: all 0.3s ease !important;
152
+ }
153
+ textarea:focus {
154
+ border-color: #9333ea !important;
155
+ box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.3) !important;
156
+ }
157
+
158
+ /* Make the input container bigger */
159
+ .chat-input-row {
160
+ padding: 20px !important;
161
+ margin-top: 20px !important;
162
+ }
163
+
164
+ /* Make examples MUCH bigger and more playful */
165
+ .examples-panel .gr-button {
166
+ font-size: 26px !important;
167
+ background-color: #f0e6ff !important;
168
+ border: 2px solid #d8b4fe !important;
169
+ margin: 10px !important;
170
+ padding: 20px 24px !important;
171
+ transition: all 0.3s ease !important;
172
+ border-radius: 16px !important;
173
+ font-weight: 600 !important;
174
+ color: #7e22ce !important;
175
+ box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05) !important;
176
+ display: block !important;
177
+ width: 100% !important;
178
+ text-align: left !important;
179
+ }
180
+ .examples-panel .gr-button:hover {
181
+ background-color: #e9d5ff !important;
182
+ transform: scale(1.03) !important;
183
+ box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1) !important;
184
+ border-color: #a855f7 !important;
185
+ }
186
+
187
+ /* Make the examples section more prominent */
188
+ .examples-panel {
189
+ padding: 20px !important;
190
+ background-color: rgba(255, 255, 255, 0.8) !important;
191
+ border-radius: 20px !important;
192
+ margin-top: 24px !important;
193
+ box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
194
+ border: 1px solid #f3e8ff !important;
195
+ }
196
+
197
+ /* Make the examples title bigger */
198
+ .examples-panel .prose h2 {
199
+ font-size: 28px !important;
200
+ margin-bottom: 20px !important;
201
+ color: #7e22ce !important;
202
+ text-align: center !important;
203
+ font-weight: 700 !important;
204
+ }
205
+
206
+ /* Add emoji to examples title */
207
+ .examples-panel .prose h2::before {
208
+ content: "✨ ";
209
+ }
210
+ .examples-panel .prose h2::after {
211
+ content: " ✨";
212
+ }
213
+
214
+ /* Add more space between chat messages */
215
+ .message {
216
+ padding: 16px !important;
217
+ margin-bottom: 16px !important;
218
+ box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1) !important;
219
+ }
220
+
221
+ /* Make the chat container wider */
222
+ .chat-container { max-width: 90% !important; margin: 0 auto !important; }
223
+
224
+ /* Increase padding in the entire app */
225
+ .gradio-container { padding: 20px !important; }
226
+
227
+ /* Make the submit button more prominent and cheerful */
228
+ .submit-btn {
229
+ background: linear-gradient(90deg, #9333ea, #d946ef) !important;
230
+ color: white !important;
231
+ font-weight: bold !important;
232
+ box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
233
+ font-size: 22px !important;
234
+ padding: 15px 25px !important;
235
+ }
236
+ .submit-btn:hover {
237
+ background: linear-gradient(90deg, #7e22ce, #c026d3) !important;
238
+ transform: translateY(-2px) !important;
239
+ }
240
  """) as interface:
241
  gr.ChatInterface(
242
  fn=chat,