Ziptoze commited on
Commit
7c3e66a
·
verified ·
1 Parent(s): 6427038

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +43 -22
app.py CHANGED
@@ -278,47 +278,68 @@ else:
278
  custom_css = """
279
  /* Dark Purple Gradient Background */
280
  body, .gradio-container {
281
- background-color: #0f0c29 !important; /* Fallback */
282
  background: linear-gradient(-45deg, #0f0c29, #302b63, #24243e) !important;
283
  background-size: 400% 400%;
284
  animation: gradient 15s ease infinite;
285
  color: #e0e7ff !important;
286
  }
287
 
288
- /* Fix for Image Components having weird background/glitches */
289
- .gradio-container button, .gradio-container img {
290
- z-index: 100;
291
- }
292
-
293
- /* Ensure images sit on top of glass effects and remove overlay icons */
294
- div[data-testid="image"],
295
- .image-container,
296
- [class*="image"],
297
- .input-image {
298
- background: transparent !important;
299
- backdrop-filter: none !important;
300
  }
301
 
302
- /* Remove the upload icon overlay on image display */
303
- .image-frame::before,
304
- [data-testid="image"]::before,
 
 
 
305
  .upload-icon,
306
- .image-container .icon {
 
 
 
307
  display: none !important;
308
  opacity: 0 !important;
309
  visibility: hidden !important;
 
310
  }
311
 
312
- /* Clean image display without artifacts */
 
 
 
 
 
 
 
 
 
 
 
 
313
  .image-frame img {
314
  display: block !important;
315
  max-width: 100% !important;
 
316
  }
317
 
318
- @keyframes gradient {
319
- 0% { background-position: 0% 50%; }
320
- 50% { background-position: 100% 50%; }
321
- 100% { background-position: 0% 50%; }
 
 
 
 
 
 
 
 
 
322
  }
323
 
324
  /* Enhanced Glassmorphism Classes */
 
278
  custom_css = """
279
  /* Dark Purple Gradient Background */
280
  body, .gradio-container {
281
+ background-color: #0f0c29 !important;
282
  background: linear-gradient(-45deg, #0f0c29, #302b63, #24243e) !important;
283
  background-size: 400% 400%;
284
  animation: gradient 15s ease infinite;
285
  color: #e0e7ff !important;
286
  }
287
 
288
+ @keyframes gradient {
289
+ 0% { background-position: 0% 50%; }
290
+ 50% { background-position: 100% 50%; }
291
+ 100% { background-position: 0% 50%; }
 
 
 
 
 
 
 
 
292
  }
293
 
294
+ /* CRITICAL: Remove ALL overlay icons on images (Gradio 5.x and 6.x) */
295
+ [data-testid="image"] button,
296
+ [data-testid="image"] .icon-button,
297
+ [data-testid="image"] svg:not(img svg),
298
+ .image-container button,
299
+ .image-container .overlay,
300
  .upload-icon,
301
+ button[aria-label*="Clear"],
302
+ button[aria-label*="Upload"],
303
+ .image-frame button,
304
+ div[class*="icon"] button {
305
  display: none !important;
306
  opacity: 0 !important;
307
  visibility: hidden !important;
308
+ pointer-events: none !important;
309
  }
310
 
311
+ /* Force clean image display without backgrounds or filters */
312
+ [data-testid="image"],
313
+ .image-container,
314
+ .image-frame,
315
+ [class*="image-wrapper"] {
316
+ background: transparent !important;
317
+ backdrop-filter: none !important;
318
+ -webkit-backdrop-filter: none !important;
319
+ }
320
+
321
+ /* Ensure actual images display properly */
322
+ [data-testid="image"] img,
323
+ .image-container img,
324
  .image-frame img {
325
  display: block !important;
326
  max-width: 100% !important;
327
+ background: transparent !important;
328
  }
329
 
330
+ /* Fix buttons to be visible and styled */
331
+ button {
332
+ display: inline-flex !important;
333
+ align-items: center !important;
334
+ justify-content: center !important;
335
+ cursor: pointer !important;
336
+ }
337
+
338
+ .primary,
339
+ button[variant="primary"] {
340
+ background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%) !important;
341
+ color: white !important;
342
+ border: none !important;
343
  }
344
 
345
  /* Enhanced Glassmorphism Classes */