Ziptoze commited on
Commit
041c7ba
·
verified ·
1 Parent(s): fb33390

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +25 -17
app.py CHANGED
@@ -300,40 +300,48 @@ body, .gradio-container {
300
  .upload-icon,
301
  button[aria-label*="Clear"],
302
  button[aria-label*="Upload"],
303
- button[aria-label*="Remove"],
304
- button[aria-label*="Edit"],
305
- button[aria-label*="Expand"],
306
  .image-frame button,
307
  div[class*="icon"] button,
308
- .image-upload-button,
309
- [class*="upload"] button,
310
- [class*="clear"] button,
311
- .icon-wrap button,
312
- button.icon,
313
- button[class*="icon"] {
314
  display: none !important;
315
  opacity: 0 !important;
316
  visibility: hidden !important;
317
  pointer-events: none !important;
318
- width: 0 !important;
319
- height: 0 !important;
320
  }
321
 
322
- /* Hide pseudo-elements that might show icons */
 
 
 
 
 
 
 
 
 
 
 
323
  [data-testid="image"]::before,
324
  [data-testid="image"]::after,
325
  .image-container::before,
326
  .image-container::after,
327
  .image-frame::before,
328
  .image-frame::after {
329
- display: none !important;
330
  content: none !important;
 
331
  }
332
 
333
- /* Hide absolutely positioned overlays */
334
- [data-testid="image"] > div[style*="absolute"],
335
- .image-container > div[style*="absolute"],
336
- [data-testid="image"] .absolute {
 
 
337
  display: none !important;
338
  }
339
 
 
300
  .upload-icon,
301
  button[aria-label*="Clear"],
302
  button[aria-label*="Upload"],
 
 
 
303
  .image-frame button,
304
  div[class*="icon"] button,
305
+ [data-testid="image"] .label,
306
+ [data-testid="image"] .placeholder,
307
+ [data-testid="image"] .empty,
308
+ .image-container .label,
309
+ .image-container .placeholder,
310
+ .image-container span:not(.sr-only) {
311
  display: none !important;
312
  opacity: 0 !important;
313
  visibility: hidden !important;
314
  pointer-events: none !important;
 
 
315
  }
316
 
317
+ /* Hide the "Document Source" label that overlays on image */
318
+ [data-testid="image"] label,
319
+ .image-container > label,
320
+ .image-frame label,
321
+ [class*="ImageLabel"] {
322
+ position: absolute !important;
323
+ top: -9999px !important;
324
+ left: -9999px !important;
325
+ display: none !important;
326
+ }
327
+
328
+ /* Remove any icon/logo that appears over the image */
329
  [data-testid="image"]::before,
330
  [data-testid="image"]::after,
331
  .image-container::before,
332
  .image-container::after,
333
  .image-frame::before,
334
  .image-frame::after {
 
335
  content: none !important;
336
+ display: none !important;
337
  }
338
 
339
+ /* Target Gradio 6.x specific overlay elements */
340
+ .upload-text,
341
+ .or-text,
342
+ .click-to-upload,
343
+ [class*="upload"][class*="text"],
344
+ [class*="placeholder-"] {
345
  display: none !important;
346
  }
347