mnawfal29 commited on
Commit
31afc45
·
verified ·
1 Parent(s): 501f367

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. demo/ui.py +90 -7
demo/ui.py CHANGED
@@ -593,12 +593,12 @@ footer, .gradio-container footer { display: none !important; }
593
  }
594
  .gradio-container ::-webkit-scrollbar-thumb:hover { background: var(--lf-text-subtle); }
595
 
596
- /* Sidebar column — subtle card treatment, sticky-feeling */
597
  .gradio-container .lf-sidebar {
598
  background: var(--lf-surface) !important;
599
  border: 1px solid var(--lf-border) !important;
600
  border-radius: 12px !important;
601
- padding: 1.25rem 1.25rem 1.1rem !important;
602
  box-shadow: 0 1px 0 rgba(20,20,19,0.02);
603
  }
604
  .gradio-container .lf-sidebar h3 {
@@ -606,21 +606,104 @@ footer, .gradio-container footer { display: none !important; }
606
  margin-bottom: 0.3rem !important;
607
  }
608
  .gradio-container .lf-sidebar p {
609
- font-size: 0.9rem !important;
610
  margin-bottom: 0.85rem !important;
 
611
  }
612
- .gradio-container .lf-sidebar .block {
613
- /* Sidebars nest "blocks"; flatten them so the card feel is the outer one */
 
 
 
 
 
614
  background: transparent !important;
615
  border: none !important;
616
- padding: 0.35rem 0 !important;
 
617
  border-radius: 0 !important;
 
 
 
 
 
 
618
  }
619
  .gradio-container .lf-sidebar button {
620
  width: 100% !important;
621
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
622
 
623
- /* Main pane plots+outputs — a bit more breathing room */
624
  .gradio-container .gr-plot, .gradio-container .plot-wrap {
625
  background: var(--lf-surface-alt) !important;
626
  border-radius: 10px !important;
 
593
  }
594
  .gradio-container ::-webkit-scrollbar-thumb:hover { background: var(--lf-text-subtle); }
595
 
596
+ /* Sidebar column — one card; inside is flat */
597
  .gradio-container .lf-sidebar {
598
  background: var(--lf-surface) !important;
599
  border: 1px solid var(--lf-border) !important;
600
  border-radius: 12px !important;
601
+ padding: 1.5rem 1.35rem 1.35rem !important;
602
  box-shadow: 0 1px 0 rgba(20,20,19,0.02);
603
  }
604
  .gradio-container .lf-sidebar h3 {
 
606
  margin-bottom: 0.3rem !important;
607
  }
608
  .gradio-container .lf-sidebar p {
609
+ font-size: 0.88rem !important;
610
  margin-bottom: 0.85rem !important;
611
+ color: var(--lf-text-muted) !important;
612
  }
613
+ /* Flatten ALL nested blocks inside the sidebar no card-in-card */
614
+ .gradio-container .lf-sidebar .block,
615
+ .gradio-container .lf-sidebar .form,
616
+ .gradio-container .lf-sidebar .gr-box,
617
+ .gradio-container .lf-sidebar .gr-panel,
618
+ .gradio-container .lf-sidebar .wrap,
619
+ .gradio-container .lf-sidebar fieldset {
620
  background: transparent !important;
621
  border: none !important;
622
+ padding: 0 !important;
623
+ margin: 0 !important;
624
  border-radius: 0 !important;
625
+ box-shadow: none !important;
626
+ }
627
+ /* Space between consecutive controls in the sidebar */
628
+ .gradio-container .lf-sidebar > div > *,
629
+ .gradio-container .lf-sidebar > .form > * {
630
+ margin-bottom: 0.85rem !important;
631
  }
632
  .gradio-container .lf-sidebar button {
633
  width: 100% !important;
634
  }
635
+ .gradio-container .lf-sidebar hr,
636
+ .gradio-container .lf-sidebar .prose hr {
637
+ border: none !important;
638
+ border-top: 1px solid var(--lf-border) !important;
639
+ margin: 1.1rem 0 !important;
640
+ }
641
+
642
+ /* Hide ugly number-input spinner arrows (▲▼) */
643
+ .gradio-container input[type="number"]::-webkit-outer-spin-button,
644
+ .gradio-container input[type="number"]::-webkit-inner-spin-button {
645
+ -webkit-appearance: none !important;
646
+ appearance: none !important;
647
+ margin: 0 !important;
648
+ }
649
+ .gradio-container input[type="number"] {
650
+ -moz-appearance: textfield !important;
651
+ appearance: textfield !important;
652
+ }
653
+
654
+ /* Slider value-input on the right — align + size so "0.95" doesn't clip */
655
+ .gradio-container .slider-container,
656
+ .gradio-container [data-testid="slider"] {
657
+ display: flex !important;
658
+ flex-direction: column !important;
659
+ gap: 0.4rem !important;
660
+ }
661
+ .gradio-container [data-testid="slider"] .head,
662
+ .gradio-container .tab-like-container {
663
+ display: flex !important;
664
+ align-items: center !important;
665
+ justify-content: space-between !important;
666
+ gap: 0.5rem !important;
667
+ }
668
+ .gradio-container [data-testid="slider"] input[type="number"] {
669
+ width: 68px !important;
670
+ min-width: 68px !important;
671
+ max-width: 80px !important;
672
+ text-align: right !important;
673
+ padding: 0.3rem 0.5rem !important;
674
+ min-height: 30px !important;
675
+ font-size: 0.85rem !important;
676
+ }
677
+
678
+ /* Reset-button next to number inputs — make it transparent & subtle */
679
+ .gradio-container [data-testid="slider"] button,
680
+ .gradio-container .reset-button {
681
+ background: transparent !important;
682
+ border: none !important;
683
+ color: var(--lf-text-subtle) !important;
684
+ padding: 0.15rem !important;
685
+ min-width: 26px !important;
686
+ width: 26px !important;
687
+ height: 26px !important;
688
+ }
689
+ .gradio-container [data-testid="slider"] button:hover {
690
+ color: var(--lf-accent) !important;
691
+ background: var(--lf-accent-soft) !important;
692
+ }
693
+
694
+ /* Inline code tag (like `/v1/chat/completions`) — softer */
695
+ .gradio-container .lf-sidebar .prose code,
696
+ .gradio-container .lf-sidebar .markdown code,
697
+ .gradio-container .lf-sidebar code {
698
+ background: var(--lf-surface-alt) !important;
699
+ border: 1px solid var(--lf-border) !important;
700
+ color: var(--lf-text) !important;
701
+ padding: 0.1em 0.4em !important;
702
+ border-radius: 4px !important;
703
+ font-size: 0.82em !important;
704
+ }
705
 
706
+ /* Main pane plots+outputs */
707
  .gradio-container .gr-plot, .gradio-container .plot-wrap {
708
  background: var(--lf-surface-alt) !important;
709
  border-radius: 10px !important;