Commit ·
baf27fb
1
Parent(s): 2c9a473
add
Browse files
app.py
CHANGED
|
@@ -1463,11 +1463,27 @@ CSS = """
|
|
| 1463 |
--accent: #7dd3fc;
|
| 1464 |
--accent-2: #f59e0b;
|
| 1465 |
}
|
|
|
|
|
|
|
|
|
|
| 1466 |
body {
|
| 1467 |
background:
|
| 1468 |
radial-gradient(circle at top left, rgba(125, 211, 252, 0.22), transparent 28%),
|
| 1469 |
radial-gradient(circle at top right, rgba(245, 158, 11, 0.16), transparent 24%),
|
| 1470 |
linear-gradient(135deg, var(--bg-1), var(--bg-2));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1471 |
}
|
| 1472 |
.wrap {
|
| 1473 |
max-width: 1180px;
|
|
@@ -2290,11 +2306,56 @@ APP_JS = """
|
|
| 2290 |
boot();
|
| 2291 |
}
|
| 2292 |
})();
|
| 2293 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2294 |
|
| 2295 |
|
| 2296 |
with gr.Blocks(
|
| 2297 |
title="Polyglot Tagger Studio",
|
|
|
|
|
|
|
| 2298 |
) as demo:
|
| 2299 |
gr.HTML(
|
| 2300 |
"""
|
|
@@ -2417,4 +2478,4 @@ with gr.Blocks(
|
|
| 2417 |
|
| 2418 |
if __name__ == "__main__":
|
| 2419 |
demo.queue()
|
| 2420 |
-
demo.launch(
|
|
|
|
| 1463 |
--accent: #7dd3fc;
|
| 1464 |
--accent-2: #f59e0b;
|
| 1465 |
}
|
| 1466 |
+
html {
|
| 1467 |
+
color-scheme: dark;
|
| 1468 |
+
}
|
| 1469 |
body {
|
| 1470 |
background:
|
| 1471 |
radial-gradient(circle at top left, rgba(125, 211, 252, 0.22), transparent 28%),
|
| 1472 |
radial-gradient(circle at top right, rgba(245, 158, 11, 0.16), transparent 24%),
|
| 1473 |
linear-gradient(135deg, var(--bg-1), var(--bg-2));
|
| 1474 |
+
color: var(--text);
|
| 1475 |
+
}
|
| 1476 |
+
.gradio-container {
|
| 1477 |
+
color: var(--text);
|
| 1478 |
+
}
|
| 1479 |
+
.gradio-container *,
|
| 1480 |
+
.gradio-container :is(p, span, div, label, strong, em, li, summary) {
|
| 1481 |
+
color: inherit;
|
| 1482 |
+
}
|
| 1483 |
+
.gradio-container input,
|
| 1484 |
+
.gradio-container textarea,
|
| 1485 |
+
.gradio-container select {
|
| 1486 |
+
color: var(--text) !important;
|
| 1487 |
}
|
| 1488 |
.wrap {
|
| 1489 |
max-width: 1180px;
|
|
|
|
| 2306 |
boot();
|
| 2307 |
}
|
| 2308 |
})();
|
| 2309 |
+
"""
|
| 2310 |
+
|
| 2311 |
+
APP_THEME = gr.themes.Soft().set(
|
| 2312 |
+
body_background_fill="#06111f",
|
| 2313 |
+
body_background_fill_dark="#06111f",
|
| 2314 |
+
body_text_color="#f4f7fb",
|
| 2315 |
+
body_text_color_dark="#f4f7fb",
|
| 2316 |
+
body_text_color_subdued="#b7c3d6",
|
| 2317 |
+
body_text_color_subdued_dark="#b7c3d6",
|
| 2318 |
+
background_fill_primary="#0b1220",
|
| 2319 |
+
background_fill_primary_dark="#0b1220",
|
| 2320 |
+
background_fill_secondary="#10192b",
|
| 2321 |
+
background_fill_secondary_dark="#10192b",
|
| 2322 |
+
panel_background_fill="#0b1220",
|
| 2323 |
+
panel_background_fill_dark="#0b1220",
|
| 2324 |
+
panel_border_color="rgba(255, 255, 255, 0.12)",
|
| 2325 |
+
panel_border_color_dark="rgba(255, 255, 255, 0.12)",
|
| 2326 |
+
block_background_fill="#0b1220",
|
| 2327 |
+
block_background_fill_dark="#0b1220",
|
| 2328 |
+
block_border_color="rgba(255, 255, 255, 0.12)",
|
| 2329 |
+
block_border_color_dark="rgba(255, 255, 255, 0.12)",
|
| 2330 |
+
input_background_fill="#111827",
|
| 2331 |
+
input_background_fill_dark="#111827",
|
| 2332 |
+
input_border_color="rgba(255, 255, 255, 0.12)",
|
| 2333 |
+
input_border_color_dark="rgba(255, 255, 255, 0.12)",
|
| 2334 |
+
input_placeholder_color="#94a3b8",
|
| 2335 |
+
input_placeholder_color_dark="#94a3b8",
|
| 2336 |
+
button_secondary_background_fill="#202938",
|
| 2337 |
+
button_secondary_background_fill_dark="#202938",
|
| 2338 |
+
button_secondary_background_fill_hover="#283244",
|
| 2339 |
+
button_secondary_background_fill_hover_dark="#283244",
|
| 2340 |
+
button_secondary_border_color="rgba(255, 255, 255, 0.12)",
|
| 2341 |
+
button_secondary_border_color_dark="rgba(255, 255, 255, 0.12)",
|
| 2342 |
+
button_secondary_text_color="#f4f7fb",
|
| 2343 |
+
button_secondary_text_color_dark="#f4f7fb",
|
| 2344 |
+
button_primary_background_fill="#2563eb",
|
| 2345 |
+
button_primary_background_fill_dark="#2563eb",
|
| 2346 |
+
button_primary_text_color="#ffffff",
|
| 2347 |
+
button_primary_text_color_dark="#ffffff",
|
| 2348 |
+
checkbox_label_text_color="#f4f7fb",
|
| 2349 |
+
checkbox_label_text_color_dark="#f4f7fb",
|
| 2350 |
+
radio_circle="#7dd3fc",
|
| 2351 |
+
checkbox_check="#7dd3fc",
|
| 2352 |
+
)
|
| 2353 |
|
| 2354 |
|
| 2355 |
with gr.Blocks(
|
| 2356 |
title="Polyglot Tagger Studio",
|
| 2357 |
+
theme=APP_THEME,
|
| 2358 |
+
css=CSS,
|
| 2359 |
) as demo:
|
| 2360 |
gr.HTML(
|
| 2361 |
"""
|
|
|
|
| 2478 |
|
| 2479 |
if __name__ == "__main__":
|
| 2480 |
demo.queue()
|
| 2481 |
+
demo.launch(js=APP_JS, share=os.getenv("GRADIO_SHARE", "1") != "0")
|