Spaces:
Running on Zero
Running on Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -696,7 +696,10 @@ def build_catalogue() -> str:
|
|
| 696 |
|
| 697 |
return f"""<style>
|
| 698 |
.cat-wrap, .cat-wrap * {{ color: #E6F0F6 !important; font-family: 'IBM Plex Sans', system-ui, sans-serif; }}
|
| 699 |
-
.cat-wrap {{
|
|
|
|
|
|
|
|
|
|
| 700 |
.cat-head {{ font-family: 'IBM Plex Mono', monospace; font-size: .66rem; letter-spacing: .2em;
|
| 701 |
text-transform: uppercase; color: #8FB6D0 !important; margin-bottom: 4px; }}
|
| 702 |
.cat-intro {{ font-size: .9rem; color: #A9C9DF !important; max-width: 62ch; line-height: 1.65; margin: 0 0 20px; }}
|
|
@@ -936,7 +939,14 @@ body { position: static !important; overflow-x: hidden !important; }
|
|
| 936 |
#result_col::-webkit-scrollbar-thumb { background: rgba(143,182,208,.45); border-radius: 4px; }
|
| 937 |
#result_col::-webkit-scrollbar-thumb:hover { background: var(--redline); }
|
| 938 |
|
| 939 |
-
#catalogue_bar { margin-top: 26px; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 940 |
|
| 941 |
@media (max-width: 1000px) { .gradio-container { padding: 16px 14px 56px !important; } }
|
| 942 |
@media (max-width: 720px) {
|
|
@@ -956,10 +966,6 @@ with gr.Blocks(css=CSS, title="Facade — architectural style finder",
|
|
| 956 |
<div class="sub">Elevation survey · style identification · 1000-plate reference corpus</div>
|
| 957 |
</div>""")
|
| 958 |
|
| 959 |
-
with gr.Row(elem_id="catalogue_bar"):
|
| 960 |
-
show_cat = gr.Button("Show the 20 styles this can identify", size="sm")
|
| 961 |
-
catalogue_top = gr.HTML()
|
| 962 |
-
|
| 963 |
with gr.Row():
|
| 964 |
with gr.Column(scale=5, elem_id="controls"):
|
| 965 |
img = gr.Image(type="pil", label="Elevation photograph", height=300)
|
|
@@ -985,6 +991,10 @@ with gr.Blocks(css=CSS, title="Facade — architectural style finder",
|
|
| 985 |
with gr.Column(scale=7, elem_id="result_col"):
|
| 986 |
out = gr.HTML(EMPTY_HTML)
|
| 987 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 988 |
def do_geocode(q):
|
| 989 |
hit = geocode(q)
|
| 990 |
if not hit:
|
|
|
|
| 696 |
|
| 697 |
return f"""<style>
|
| 698 |
.cat-wrap, .cat-wrap * {{ color: #E6F0F6 !important; font-family: 'IBM Plex Sans', system-ui, sans-serif; }}
|
| 699 |
+
.cat-wrap {{ max-height: 72vh; overflow-y: auto; padding: 4px 8px 4px 0; }}
|
| 700 |
+
.cat-wrap::-webkit-scrollbar {{ width: 9px; }}
|
| 701 |
+
.cat-wrap::-webkit-scrollbar-track {{ background: rgba(11,31,47,.6); }}
|
| 702 |
+
.cat-wrap::-webkit-scrollbar-thumb {{ background: rgba(143,182,208,.45); border-radius: 4px; }}
|
| 703 |
.cat-head {{ font-family: 'IBM Plex Mono', monospace; font-size: .66rem; letter-spacing: .2em;
|
| 704 |
text-transform: uppercase; color: #8FB6D0 !important; margin-bottom: 4px; }}
|
| 705 |
.cat-intro {{ font-size: .9rem; color: #A9C9DF !important; max-width: 62ch; line-height: 1.65; margin: 0 0 20px; }}
|
|
|
|
| 939 |
#result_col::-webkit-scrollbar-thumb { background: rgba(143,182,208,.45); border-radius: 4px; }
|
| 940 |
#result_col::-webkit-scrollbar-thumb:hover { background: var(--redline); }
|
| 941 |
|
| 942 |
+
#catalogue_bar { margin-top: 26px; border: 1px solid var(--line) !important; background: rgba(18,50,74,.55) !important; }
|
| 943 |
+
#catalogue_bar > button, #catalogue_bar .label-wrap, #catalogue_bar span {
|
| 944 |
+
color: var(--paper) !important;
|
| 945 |
+
font-family: 'IBM Plex Mono', monospace !important;
|
| 946 |
+
font-size: .74rem !important; letter-spacing: .14em !important;
|
| 947 |
+
text-transform: uppercase !important;
|
| 948 |
+
}
|
| 949 |
+
#catalogue_bar svg { color: var(--redline) !important; }
|
| 950 |
|
| 951 |
@media (max-width: 1000px) { .gradio-container { padding: 16px 14px 56px !important; } }
|
| 952 |
@media (max-width: 720px) {
|
|
|
|
| 966 |
<div class="sub">Elevation survey · style identification · 1000-plate reference corpus</div>
|
| 967 |
</div>""")
|
| 968 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 969 |
with gr.Row():
|
| 970 |
with gr.Column(scale=5, elem_id="controls"):
|
| 971 |
img = gr.Image(type="pil", label="Elevation photograph", height=300)
|
|
|
|
| 991 |
with gr.Column(scale=7, elem_id="result_col"):
|
| 992 |
out = gr.HTML(EMPTY_HTML)
|
| 993 |
|
| 994 |
+
with gr.Accordion("The 20 styles this can identify", open=False,
|
| 995 |
+
elem_id="catalogue_bar"):
|
| 996 |
+
catalogue_top = gr.HTML()
|
| 997 |
+
|
| 998 |
def do_geocode(q):
|
| 999 |
hit = geocode(q)
|
| 1000 |
if not hit:
|