Jonathandav commited on
Commit
109bd0b
·
verified ·
1 Parent(s): e0520a1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +69 -5
app.py CHANGED
@@ -545,7 +545,30 @@ html, body, gradio-app { min-height: 100%; background: var(--ink) !important; }
545
  .sheet, .sheet p, .sheet li, .sheet h2, .sheet div, .sheet span, .sheet a { color: var(--paper); }
546
  .sheet .eyebrow, .sheet .alt-meta, .sheet .alt-pct, .sheet .near-meta,
547
  .sheet .titleblock, .sheet .cut-label { color: var(--line); }
548
- .sheet .period, .sheet .cut-figure, .sheet .tick, .sheet .err-title { color: var(--redline); }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
549
  .sheet.empty { color: var(--line); }
550
  .sheet.empty p { font-family: 'IBM Plex Mono', monospace; font-size: .8rem; line-height: 1.7; }
551
 
@@ -617,7 +640,7 @@ footer, .gradio-container footer { background: transparent !important; margin-to
617
 
618
  /* Gradio's own widgets default to a light theme; bring them onto the sheet. */
619
  #controls .block, #controls .form, #controls .wrap,
620
- #controls input, #controls textarea,
621
  #controls .image-container, #controls [data-testid="block-label"] {
622
  background: rgba(11,31,47,.72) !important;
623
  border-color: rgba(143,182,208,.45) !important;
@@ -628,9 +651,50 @@ footer, .gradio-container footer { background: transparent !important; margin-to
628
  }
629
  #controls .image-frame, #controls .upload-container { background: rgba(11,31,47,.72) !important; }
630
  #controls label span, #controls .head, #controls span[data-testid] { color: var(--line) !important; }
631
- #controls input[type="checkbox"] { accent-color: var(--redline); }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
632
  #controls .head svg, #controls .icon svg { color: var(--line) !important; }
633
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
634
  .err-title { font-family: 'Archivo Narrow', sans-serif; color: var(--redline); font-size: 1.4rem; margin: 0 0 6px; }
635
  .err-msg { font-family: 'IBM Plex Mono', monospace; font-size: .82rem; color: var(--paper); }
636
  .err-trace {
@@ -679,7 +743,7 @@ with gr.Blocks(css=CSS, title="Facade — architectural style finder",
679
  with gr.Row():
680
  find = gr.Button("Find on map", size="sm")
681
  here = gr.Button("Use my device location", size="sm")
682
- place_note = gr.Markdown("")
683
  with gr.Row():
684
  lat = gr.Number(label="Latitude", value=32.0771, precision=4)
685
  lon = gr.Number(label="Longitude", value=34.7745, precision=4)
@@ -718,4 +782,4 @@ with gr.Blocks(css=CSS, title="Facade — architectural style finder",
718
  go.click(identify, [img, use_loc, lat, lon, weight], out)
719
 
720
  if __name__ == "__main__":
721
- demo.launch()
 
545
  .sheet, .sheet p, .sheet li, .sheet h2, .sheet div, .sheet span, .sheet a { color: var(--paper); }
546
  .sheet .eyebrow, .sheet .alt-meta, .sheet .alt-pct, .sheet .near-meta,
547
  .sheet .titleblock, .sheet .cut-label { color: var(--line); }
548
+ .sheet .period, .sheet .cut-figure, .sheet .tick, .sheet /* Geocoder feedback and secondary buttons: Gradio's prose and button themes
549
+ both default light, so they need explicit overrides here. */
550
+ #place_note, #place_note *, #place_note p, #place_note strong {
551
+ color: #A9C9DF !important;
552
+ font-family: 'IBM Plex Mono', monospace !important;
553
+ font-size: .74rem !important; line-height: 1.6 !important; margin: 4px 0 !important;
554
+ }
555
+ #place_note strong { color: var(--paper) !important; }
556
+
557
+ #controls button.secondary, #controls button.sm, #controls .form button {
558
+ background: rgba(11,31,47,.85) !important;
559
+ border: 1px solid rgba(143,182,208,.55) !important;
560
+ color: var(--paper) !important;
561
+ font-family: 'IBM Plex Mono', monospace !important;
562
+ font-size: .7rem !important; letter-spacing: .1em !important;
563
+ text-transform: uppercase !important;
564
+ }
565
+ #controls button.secondary:hover, #controls .form button:hover {
566
+ border-color: var(--redline) !important; color: var(--redline) !important;
567
+ }
568
+ #controls textarea, #controls textarea::placeholder { color: var(--paper) !important; }
569
+ #controls textarea::placeholder { color: rgba(143,182,208,.7) !important; }
570
+
571
+ .err-title { color: var(--redline); }
572
  .sheet.empty { color: var(--line); }
573
  .sheet.empty p { font-family: 'IBM Plex Mono', monospace; font-size: .8rem; line-height: 1.7; }
574
 
 
640
 
641
  /* Gradio's own widgets default to a light theme; bring them onto the sheet. */
642
  #controls .block, #controls .form, #controls .wrap,
643
+ #controls input:not([type="checkbox"]), #controls textarea,
644
  #controls .image-container, #controls [data-testid="block-label"] {
645
  background: rgba(11,31,47,.72) !important;
646
  border-color: rgba(143,182,208,.45) !important;
 
651
  }
652
  #controls .image-frame, #controls .upload-container { background: rgba(11,31,47,.72) !important; }
653
  #controls label span, #controls .head, #controls span[data-testid] { color: var(--line) !important; }
654
+ /* Explicit checkbox styling: visible in both states against the ink ground. */
655
+ #controls input[type="checkbox"] {
656
+ appearance: none; -webkit-appearance: none;
657
+ width: 18px; height: 18px; min-width: 18px;
658
+ border: 1px solid var(--line) !important;
659
+ background: rgba(11,31,47,.85) !important;
660
+ border-radius: 2px; cursor: pointer; position: relative;
661
+ display: inline-block; vertical-align: middle;
662
+ }
663
+ #controls input[type="checkbox"]:checked {
664
+ background: var(--redline) !important;
665
+ border-color: var(--redline) !important;
666
+ }
667
+ #controls input[type="checkbox"]:checked::after {
668
+ content: ""; position: absolute; left: 5px; top: 1px;
669
+ width: 5px; height: 10px; border: solid #fff;
670
+ border-width: 0 2px 2px 0; transform: rotate(45deg);
671
+ }
672
+ #controls input[type="checkbox"]:focus-visible { outline: 2px solid var(--redline); outline-offset: 2px; }
673
  #controls .head svg, #controls .icon svg { color: var(--line) !important; }
674
 
675
+ /* Geocoder feedback and secondary buttons: Gradio's prose and button themes
676
+ both default light, so they need explicit overrides here. */
677
+ #place_note, #place_note *, #place_note p, #place_note strong {
678
+ color: #A9C9DF !important;
679
+ font-family: 'IBM Plex Mono', monospace !important;
680
+ font-size: .74rem !important; line-height: 1.6 !important; margin: 4px 0 !important;
681
+ }
682
+ #place_note strong { color: var(--paper) !important; }
683
+
684
+ #controls button.secondary, #controls button.sm, #controls .form button {
685
+ background: rgba(11,31,47,.85) !important;
686
+ border: 1px solid rgba(143,182,208,.55) !important;
687
+ color: var(--paper) !important;
688
+ font-family: 'IBM Plex Mono', monospace !important;
689
+ font-size: .7rem !important; letter-spacing: .1em !important;
690
+ text-transform: uppercase !important;
691
+ }
692
+ #controls button.secondary:hover, #controls .form button:hover {
693
+ border-color: var(--redline) !important; color: var(--redline) !important;
694
+ }
695
+ #controls textarea, #controls textarea::placeholder { color: var(--paper) !important; }
696
+ #controls textarea::placeholder { color: rgba(143,182,208,.7) !important; }
697
+
698
  .err-title { font-family: 'Archivo Narrow', sans-serif; color: var(--redline); font-size: 1.4rem; margin: 0 0 6px; }
699
  .err-msg { font-family: 'IBM Plex Mono', monospace; font-size: .82rem; color: var(--paper); }
700
  .err-trace {
 
743
  with gr.Row():
744
  find = gr.Button("Find on map", size="sm")
745
  here = gr.Button("Use my device location", size="sm")
746
+ place_note = gr.Markdown("", elem_id="place_note")
747
  with gr.Row():
748
  lat = gr.Number(label="Latitude", value=32.0771, precision=4)
749
  lon = gr.Number(label="Longitude", value=34.7745, precision=4)
 
782
  go.click(identify, [img, use_loc, lat, lon, weight], out)
783
 
784
  if __name__ == "__main__":
785
+ demo.launch()