prithivMLmods commited on
Commit
c692b6e
·
verified ·
1 Parent(s): 91432cf

update app

Browse files
Files changed (1) hide show
  1. app.py +243 -1
app.py CHANGED
@@ -143,25 +143,267 @@ def process_image(image, task):
143
 
144
 
145
  css = """
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
146
  #col-container {
147
  margin: 0 auto;
148
  max-width: 1000px;
149
  }
150
 
 
151
  #main-title {
152
  text-align: center !important;
 
153
  }
154
 
155
  #main-title h1 {
156
- font-size: 2.3em !important;
 
 
 
 
 
 
 
 
157
  }
158
 
 
 
 
 
 
 
159
  #subtitle {
160
  text-align: center !important;
 
161
  }
162
 
163
  #subtitle p {
164
  margin: 0 auto;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
165
  }
166
  """
167
 
 
143
 
144
 
145
  css = """
146
+ @import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');
147
+
148
+ /* Background grid pattern */
149
+ body, .gradio-container {
150
+ background-color: #FFF5EB !important;
151
+ background-image:
152
+ linear-gradient(#FFE0CC 1px, transparent 1px),
153
+ linear-gradient(90deg, #FFE0CC 1px, transparent 1px) !important;
154
+ background-size: 40px 40px !important;
155
+ font-family: 'Outfit', sans-serif !important;
156
+ }
157
+
158
+ /* Dark mode grid */
159
+ .dark body, .dark .gradio-container {
160
+ background-color: #1a1a1a !important;
161
+ background-image:
162
+ linear-gradient(rgba(255, 69, 0, 0.1) 1px, transparent 1px),
163
+ linear-gradient(90deg, rgba(255, 69, 0, 0.1) 1px, transparent 1px) !important;
164
+ background-size: 40px 40px !important;
165
+ }
166
+
167
  #col-container {
168
  margin: 0 auto;
169
  max-width: 1000px;
170
  }
171
 
172
+ /* Main title styling */
173
  #main-title {
174
  text-align: center !important;
175
+ padding: 1rem 0 0.5rem 0;
176
  }
177
 
178
  #main-title h1 {
179
+ font-size: 2.5em !important;
180
+ font-weight: 700 !important;
181
+ background: linear-gradient(135deg, #FF4500 0%, #FF8533 50%, #E63E00 100%);
182
+ background-size: 200% 200%;
183
+ -webkit-background-clip: text;
184
+ -webkit-text-fill-color: transparent;
185
+ background-clip: text;
186
+ animation: gradient-shift 4s ease infinite;
187
+ letter-spacing: -0.02em;
188
  }
189
 
190
+ @keyframes gradient-shift {
191
+ 0%, 100% { background-position: 0% 50%; }
192
+ 50% { background-position: 100% 50%; }
193
+ }
194
+
195
+ /* Subtitle styling */
196
  #subtitle {
197
  text-align: center !important;
198
+ margin-bottom: 1.5rem;
199
  }
200
 
201
  #subtitle p {
202
  margin: 0 auto;
203
+ color: #666666;
204
+ font-size: 1rem;
205
+ }
206
+
207
+ #subtitle a {
208
+ color: #FF4500 !important;
209
+ text-decoration: none;
210
+ font-weight: 500;
211
+ }
212
+
213
+ #subtitle a:hover {
214
+ text-decoration: underline;
215
+ }
216
+
217
+ /* Card styling */
218
+ .gradio-group {
219
+ background: rgba(255, 255, 255, 0.9) !important;
220
+ border: 2px solid #FFE0CC !important;
221
+ border-radius: 12px !important;
222
+ box-shadow: 0 4px 24px rgba(255, 69, 0, 0.08) !important;
223
+ backdrop-filter: blur(10px);
224
+ transition: all 0.3s ease;
225
+ }
226
+
227
+ .gradio-group:hover {
228
+ box-shadow: 0 8px 32px rgba(255, 69, 0, 0.12) !important;
229
+ border-color: #FFC299 !important;
230
+ }
231
+
232
+ .dark .gradio-group {
233
+ background: rgba(30, 30, 30, 0.9) !important;
234
+ border-color: rgba(255, 69, 0, 0.3) !important;
235
+ }
236
+
237
+ /* Image upload area */
238
+ .gradio-image {
239
+ border-radius: 10px !important;
240
+ overflow: hidden;
241
+ border: 2px dashed #FFC299 !important;
242
+ transition: all 0.3s ease;
243
+ }
244
+
245
+ .gradio-image:hover {
246
+ border-color: #FF4500 !important;
247
+ background: rgba(255, 69, 0, 0.02) !important;
248
+ }
249
+
250
+ /* Radio buttons */
251
+ .gradio-radio {
252
+ border-radius: 8px !important;
253
+ }
254
+
255
+ .gradio-radio label {
256
+ border-radius: 6px !important;
257
+ transition: all 0.2s ease !important;
258
+ border: 1px solid transparent !important;
259
+ }
260
+
261
+ .gradio-radio label:hover {
262
+ background: rgba(255, 69, 0, 0.05) !important;
263
+ }
264
+
265
+ .gradio-radio label.selected {
266
+ background: rgba(255, 69, 0, 0.1) !important;
267
+ border-color: #FF4500 !important;
268
+ }
269
+
270
+ /* Primary button */
271
+ .primary {
272
+ border-radius: 8px !important;
273
+ font-weight: 600 !important;
274
+ text-transform: uppercase !important;
275
+ letter-spacing: 0.05em !important;
276
+ transition: all 0.3s ease !important;
277
+ }
278
+
279
+ .primary:hover {
280
+ transform: translateY(-2px) !important;
281
+ }
282
+
283
+ /* Tabs styling */
284
+ .tab-nav {
285
+ border-bottom: 2px solid #FFE0CC !important;
286
+ }
287
+
288
+ .tab-nav button {
289
+ font-weight: 500 !important;
290
+ padding: 10px 18px !important;
291
+ border-radius: 8px 8px 0 0 !important;
292
+ transition: all 0.2s ease !important;
293
+ }
294
+
295
+ .tab-nav button.selected {
296
+ background: rgba(255, 69, 0, 0.1) !important;
297
+ border-bottom: 2px solid #FF4500 !important;
298
+ }
299
+
300
+ /* Output textbox */
301
+ .gradio-textbox textarea {
302
+ font-family: 'IBM Plex Mono', monospace !important;
303
+ font-size: 0.95rem !important;
304
+ line-height: 1.7 !important;
305
+ background: rgba(255, 255, 255, 0.95) !important;
306
+ border: 1px solid #FFE0CC !important;
307
+ border-radius: 8px !important;
308
+ }
309
+
310
+ .dark .gradio-textbox textarea {
311
+ background: rgba(30, 30, 30, 0.95) !important;
312
+ border-color: rgba(255, 69, 0, 0.2) !important;
313
+ }
314
+
315
+ /* Markdown output */
316
+ .gradio-markdown {
317
+ font-family: 'Outfit', sans-serif !important;
318
+ line-height: 1.7 !important;
319
+ }
320
+
321
+ .gradio-markdown code {
322
+ font-family: 'IBM Plex Mono', monospace !important;
323
+ background: rgba(255, 69, 0, 0.08) !important;
324
+ padding: 2px 6px !important;
325
+ border-radius: 4px !important;
326
+ color: #CC3700 !important;
327
+ }
328
+
329
+ .gradio-markdown pre {
330
+ background: rgba(255, 69, 0, 0.05) !important;
331
+ border: 1px solid #FFE0CC !important;
332
+ border-radius: 8px !important;
333
+ padding: 1rem !important;
334
+ }
335
+
336
+ /* Examples section */
337
+ .gradio-examples {
338
+ border-radius: 10px !important;
339
+ }
340
+
341
+ .gradio-examples .gallery-item {
342
+ border: 2px solid #FFE0CC !important;
343
+ border-radius: 8px !important;
344
+ transition: all 0.2s ease !important;
345
+ }
346
+
347
+ .gradio-examples .gallery-item:hover {
348
+ border-color: #FF4500 !important;
349
+ transform: translateY(-2px) !important;
350
+ box-shadow: 0 4px 12px rgba(255, 69, 0, 0.15) !important;
351
+ }
352
+
353
+ /* Scrollbar styling */
354
+ ::-webkit-scrollbar {
355
+ width: 8px;
356
+ height: 8px;
357
+ }
358
+
359
+ ::-webkit-scrollbar-track {
360
+ background: rgba(255, 69, 0, 0.05);
361
+ border-radius: 4px;
362
+ }
363
+
364
+ ::-webkit-scrollbar-thumb {
365
+ background: linear-gradient(135deg, #FF4500, #FF8533);
366
+ border-radius: 4px;
367
+ }
368
+
369
+ ::-webkit-scrollbar-thumb:hover {
370
+ background: linear-gradient(135deg, #E63E00, #FF4500);
371
+ }
372
+
373
+ /* Accordion styling */
374
+ .gradio-accordion {
375
+ border-radius: 10px !important;
376
+ border: 1px solid #FFE0CC !important;
377
+ }
378
+
379
+ .gradio-accordion > .label-wrap {
380
+ background: rgba(255, 69, 0, 0.03) !important;
381
+ border-radius: 10px !important;
382
+ }
383
+
384
+ /* Hide footer */
385
+ footer {
386
+ display: none !important;
387
+ }
388
+
389
+ /* Animations */
390
+ @keyframes fadeIn {
391
+ from { opacity: 0; transform: translateY(10px); }
392
+ to { opacity: 1; transform: translateY(0); }
393
+ }
394
+
395
+ .gradio-row {
396
+ animation: fadeIn 0.4s ease-out;
397
+ }
398
+
399
+ /* Label styling */
400
+ label {
401
+ font-weight: 600 !important;
402
+ color: #333 !important;
403
+ }
404
+
405
+ .dark label {
406
+ color: #eee !important;
407
  }
408
  """
409