Updating theme
Browse files- app.py +12 -8
- themes/theme_schema@0.0.3.json +1 -0
app.py
CHANGED
|
@@ -117,16 +117,20 @@ with gr.Blocks() as demo:
|
|
| 117 |
|
| 118 |
with gr.Row():
|
| 119 |
with gr.Column(scale=2):
|
| 120 |
-
chatbot = gr.Chatbot(
|
|
|
|
|
|
|
|
|
|
| 121 |
chat_btn = gr.Button("Add messages")
|
| 122 |
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
|
|
|
| 130 |
with gr.Column(scale=1):
|
| 131 |
with gr.Accordion("Advanced Settings"):
|
| 132 |
gr.Markdown("Hello")
|
|
|
|
| 117 |
|
| 118 |
with gr.Row():
|
| 119 |
with gr.Column(scale=2):
|
| 120 |
+
chatbot = gr.Chatbot(
|
| 121 |
+
[{"role": "user", "content": "Hello"}, {"role": "assistant", "content": "Hi"}],
|
| 122 |
+
label="Chatbot",
|
| 123 |
+
)
|
| 124 |
chat_btn = gr.Button("Add messages")
|
| 125 |
|
| 126 |
+
def add_messages(history):
|
| 127 |
+
time.sleep(2)
|
| 128 |
+
return history + [
|
| 129 |
+
{"role": "user", "content": "How are you?"},
|
| 130 |
+
{"role": "assistant", "content": "I am good."},
|
| 131 |
+
]
|
| 132 |
+
|
| 133 |
+
chat_btn.click(add_messages, chatbot, chatbot)
|
| 134 |
with gr.Column(scale=1):
|
| 135 |
with gr.Accordion("Advanced Settings"):
|
| 136 |
gr.Markdown("Hello")
|
themes/theme_schema@0.0.3.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"theme": {"_font": [{"__gradio_font__": true, "name": "VT323", "class": "google", "weights": [400, 600]}, "Courier New", "monospace"], "_font_css": [], "_font_mono": [{"__gradio_font__": true, "name": "VT323", "class": "google", "weights": [400, 600]}, "Courier New", "monospace"], "_stylesheets": ["https://fonts.googleapis.com/css2?family=VT323:wght@400;600&display=swap", "https://fonts.googleapis.com/css2?family=VT323:wght@400;600&display=swap"], "accordion_text_color": "*body_text_color", "accordion_text_color_dark": "*body_text_color", "background_fill_primary": "#0a0a0a", "background_fill_primary_dark": "#000000", "background_fill_secondary": "#0a0a0a", "background_fill_secondary_dark": "#000000", "block_background_fill": "#0a0a0a", "block_background_fill_dark": "#050505", "block_border_color": "#33ff33", "block_border_color_dark": "*border_color_primary", "block_border_width": "1px", "block_info_text_color": "*body_text_color_subdued", "block_info_text_color_dark": "*body_text_color_subdued", "block_info_text_size": "*text_sm", "block_info_text_weight": "400", "block_label_background_fill": "*background_fill_primary", "block_label_background_fill_dark": "*background_fill_secondary", "block_label_border_color": "*border_color_primary", "block_label_border_color_dark": "*border_color_primary", "block_label_border_width": "1px", "block_label_margin": "0", "block_label_padding": "*spacing_sm *spacing_lg", "block_label_radius": "calc(*radius_sm - 1px) 0 calc(*radius_sm - 1px) 0", "block_label_right_radius": "0 calc(*radius_sm - 1px) 0 calc(*radius_sm - 1px)", "block_label_shadow": "*block_shadow", "block_label_text_color": "#33ff33", "block_label_text_color_dark": "*neutral_200", "block_label_text_size": "*text_sm", "block_label_text_weight": "400", "block_padding": "*spacing_xl calc(*spacing_xl + 2px)", "block_radius": "*radius_sm", "block_shadow": "none", "block_title_background_fill": "none", "block_title_border_color": "none", "block_title_border_width": "0px", "block_title_padding": "0", "block_title_radius": "none", "block_title_text_color": "#33ff33", "block_title_text_color_dark": "*neutral_200", "block_title_text_size": "*text_md", "block_title_text_weight": "400", "body_background_fill": "*background_fill_primary", "body_background_fill_dark": "*background_fill_primary", "body_text_color": "#33ff33", "body_text_color_dark": "#33ff33", "body_text_color_subdued": "rgba(51, 255, 51, 0.5)", "body_text_color_subdued_dark": "*neutral_400", "body_text_size": "*text_md", "body_text_weight": "400", "border_color_accent": "#33ff33", "border_color_accent_dark": "*neutral_600", "border_color_accent_subdued": "*border_color_accent", "border_color_accent_subdued_dark": "*border_color_accent", "border_color_primary": "#33ff33", "border_color_primary_dark": "#33ff33", "button_border_width": "*input_border_width", "button_cancel_background_fill": "*button_secondary_background_fill", "button_cancel_background_fill_dark": "*button_secondary_background_fill", "button_cancel_background_fill_hover": "*button_secondary_background_fill_hover", "button_cancel_background_fill_hover_dark": "*button_secondary_background_fill_hover", "button_cancel_border_color": "*button_secondary_border_color", "button_cancel_border_color_dark": "*button_secondary_border_color", "button_cancel_border_color_hover": "*button_secondary_border_color_hover", "button_cancel_border_color_hover_dark": "*button_secondary_border_color_hover", "button_cancel_shadow": "*button_secondary_shadow", "button_cancel_shadow_active": "*button_secondary_shadow_active", "button_cancel_shadow_active_dark": "*button_secondary_shadow_active", "button_cancel_shadow_dark": "*button_secondary_shadow", "button_cancel_shadow_hover": "*button_secondary_shadow_hover", "button_cancel_shadow_hover_dark": "*button_secondary_shadow_hover", "button_cancel_text_color": "*button_secondary_text_color", "button_cancel_text_color_dark": "*button_secondary_text_color", "button_cancel_text_color_hover": "*button_secondary_text_color_hover", "button_cancel_text_color_hover_dark": "white", "button_large_padding": "*spacing_lg calc(2 * *spacing_lg)", "button_large_radius": "*radius_md", "button_large_text_size": "*text_lg", "button_large_text_weight": "600", "button_medium_padding": "*spacing_md calc(2 * *spacing_md)", "button_medium_radius": "*radius_md", "button_medium_text_size": "*text_md", "button_medium_text_weight": "600", "button_primary_background_fill": "transparent", "button_primary_background_fill_dark": "*primary_600", "button_primary_background_fill_hover": "#33ff33", "button_primary_background_fill_hover_dark": "*primary_700", "button_primary_border_color": "#33ff33", "button_primary_border_color_dark": "*primary_600", "button_primary_border_color_hover": "*primary_500", "button_primary_border_color_hover_dark": "*primary_500", "button_primary_shadow": "none", "button_primary_shadow_active": "*button_primary_shadow", "button_primary_shadow_active_dark": "*button_primary_shadow", "button_primary_shadow_hover": "*button_primary_shadow", "button_primary_shadow_hover_dark": "*button_primary_shadow", "button_primary_text_color": "#33ff33", "button_primary_text_color_dark": "white", "button_primary_text_color_hover": "#000000", "button_primary_text_color_hover_dark": "*button_primary_text_color", "button_secondary_background_fill": "transparent", "button_secondary_background_fill_dark": "*neutral_600", "button_secondary_background_fill_hover": "rgba(51, 255, 51, 0.1)", "button_secondary_background_fill_hover_dark": "*neutral_700", "button_secondary_border_color": "#33ff33", "button_secondary_border_color_dark": "*neutral_600", "button_secondary_border_color_hover": "*neutral_200", "button_secondary_border_color_hover_dark": "*neutral_500", "button_secondary_shadow": "*button_primary_shadow", "button_secondary_shadow_active": "*button_secondary_shadow", "button_secondary_shadow_active_dark": "*button_secondary_shadow", "button_secondary_shadow_hover": "*button_secondary_shadow", "button_secondary_shadow_hover_dark": "*button_secondary_shadow", "button_secondary_text_color": "#33ff33", "button_secondary_text_color_dark": "white", "button_secondary_text_color_hover": "*button_secondary_text_color", "button_secondary_text_color_hover_dark": "*button_secondary_text_color", "button_small_padding": "*spacing_sm calc(1.5 * *spacing_sm)", "button_small_radius": "*radius_md", "button_small_text_size": "*text_sm", "button_small_text_weight": "400", "button_transform_active": "none", "button_transform_hover": "none", "button_transition": "all 0.2s ease", "chatbot_text_size": "*text_lg", "checkbox_background_color": "*background_fill_primary", "checkbox_background_color_dark": "*neutral_800", "checkbox_background_color_focus": "*checkbox_background_color", "checkbox_background_color_focus_dark": "*checkbox_background_color", "checkbox_background_color_hover": "*checkbox_background_color", "checkbox_background_color_hover_dark": "*checkbox_background_color", "checkbox_background_color_selected": "*color_accent", "checkbox_background_color_selected_dark": "*color_accent", "checkbox_border_color": "*neutral_300", "checkbox_border_color_dark": "*neutral_700", "checkbox_border_color_focus": "*color_accent", "checkbox_border_color_focus_dark": "*color_accent", "checkbox_border_color_hover": "*neutral_300", "checkbox_border_color_hover_dark": "*neutral_600", "checkbox_border_color_selected": "*color_accent", "checkbox_border_color_selected_dark": "*color_accent", "checkbox_border_radius": "*radius_sm", "checkbox_border_width": "*input_border_width", "checkbox_border_width_dark": "*input_border_width", "checkbox_check": "url(\"data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e\")", "checkbox_label_background_fill": "*button_secondary_background_fill", "checkbox_label_background_fill_dark": "*button_secondary_background_fill", "checkbox_label_background_fill_hover": "*button_secondary_background_fill_hover", "checkbox_label_background_fill_hover_dark": "*button_secondary_background_fill_hover", "checkbox_label_background_fill_selected": "*checkbox_label_background_fill", "checkbox_label_background_fill_selected_dark": "*checkbox_label_background_fill", "checkbox_label_border_color": "*border_color_primary", "checkbox_label_border_color_dark": "*border_color_primary", "checkbox_label_border_color_hover": "*checkbox_label_border_color", "checkbox_label_border_color_hover_dark": "*checkbox_label_border_color", "checkbox_label_border_color_selected": "*checkbox_label_border_color", "checkbox_label_border_color_selected_dark": "*checkbox_label_border_color", "checkbox_label_border_width": "*input_border_width", "checkbox_label_border_width_dark": "*input_border_width", "checkbox_label_gap": "*spacing_lg", "checkbox_label_padding": "*spacing_md calc(2 * *spacing_md)", "checkbox_label_shadow": "none", "checkbox_label_text_color": "*body_text_color", "checkbox_label_text_color_dark": "*body_text_color", "checkbox_label_text_color_selected": "*checkbox_label_text_color", "checkbox_label_text_color_selected_dark": "*checkbox_label_text_color", "checkbox_label_text_size": "*text_md", "checkbox_label_text_weight": "400", "checkbox_shadow": "*input_shadow", "code_background_fill": "*neutral_100", "code_background_fill_dark": "*neutral_800", "color_accent": "*primary_500", "color_accent_soft": "*primary_50", "color_accent_soft_dark": "*neutral_700", "container_radius": "*radius_sm", "custom_css": "/* RETRO TERMINAL - CRT Monitor Aesthetic */\n\n/* CRT screen effect */\n.gradio-container {\n background: #0a0a0a !important;\n min-height: 100vh;\n position: relative;\n}\n\n/* Scanline overlay */\n.gradio-container::before {\n content: \"\";\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: repeating-linear-gradient(\n 0deg,\n rgba(0, 0, 0, 0.15),\n rgba(0, 0, 0, 0.15) 1px,\n transparent 1px,\n transparent 2px\n );\n pointer-events: none;\n z-index: 1000;\n}\n\n/* Screen flicker - subtle */\n@keyframes flicker {\n 0%, 100% { opacity: 1; }\n 92% { opacity: 1; }\n 93% { opacity: 0.95; }\n 94% { opacity: 1; }\n}\n\n.gradio-container > * {\n animation: flicker 8s infinite;\n}\n\n/* Phosphor green text */\nh1 {\n color: #33ff33 !important;\n font-family: 'VT323', 'Courier New', monospace !important;\n font-size: 2.5rem !important;\n font-weight: 400 !important;\n text-shadow: 0 0 10px rgba(51, 255, 51, 0.5);\n letter-spacing: 2px;\n}\n\n.prose p, .markdown-text p {\n color: #33ff33 !important;\n font-family: 'VT323', 'Courier New', monospace !important;\n opacity: 0.7;\n}\n\n/* Terminal blocks - pure black background */\n.block {\n background: #0a0a0a !important;\n border: 1px solid #33ff33 !important;\n border-radius: 0 !important;\n}\n\n/* Input fields - terminal style */\n.gradio-container input[type=\"text\"],\n.gradio-container textarea {\n background: transparent !important;\n border: none !important;\n border-bottom: 1px dashed #33ff33 !important;\n border-radius: 0 !important;\n color: #33ff33 !important;\n font-family: 'VT323', 'Courier New', monospace !important;\n font-size: 1.1rem !important;\n caret-color: #33ff33;\n padding: 8px 0 !important;\n}\n\n.gradio-container input[type=\"text\"]:focus,\n.gradio-container textarea:focus {\n border-bottom: 1px solid #33ff33 !important;\n box-shadow: none !important;\n outline: none;\n}\n\n.gradio-container input[type=\"text\"]::placeholder {\n color: rgba(51, 255, 51, 0.3) !important;\n font-family: 'VT323', 'Courier New', monospace !important;\n}\n\n/* Terminal button */\nbutton.primary {\n background: transparent !important;\n border: 1px solid #33ff33 !important;\n border-radius: 0 !important;\n color: #33ff33 !important;\n font-family: 'VT323', 'Courier New', monospace !important;\n font-size: 1.2rem !important;\n letter-spacing: 1px;\n padding: 12px 24px !important;\n text-transform: uppercase;\n transition: all 0.1s ease;\n cursor: pointer;\n}\n\nbutton.primary:hover {\n background: #33ff33 !important;\n color: #000 !important;\n box-shadow: 0 0 20px rgba(51, 255, 51, 0.4);\n}\n\n/* Labels */\nlabel span {\n color: #33ff33 !important;\n font-family: 'VT323', 'Courier New', monospace !important;\n font-size: 1rem !important;\n text-transform: uppercase;\n letter-spacing: 1px;\n opacity: 0.8;\n}\n\n/* Code block - main terminal output */\n.code-wrap {\n background: #050505 !important;\n border: 1px solid #33ff33 !important;\n border-radius: 0 !important;\n}\n\n.code-wrap pre,\n.code-wrap code,\n.code-wrap .cm-content,\n.code-wrap .cm-line {\n color: #33ff33 !important;\n font-family: 'VT323', 'Courier New', monospace !important;\n font-size: 24px !important;\n line-height: 1.5 !important;\n text-shadow: 0 0 5px rgba(51, 255, 51, 0.3);\n}\n\n/* Remove borders from containers */\n.contain, .gap, .form {\n border: none !important;\n}\n\n/* Blinking cursor effect for empty inputs */\n@keyframes blink {\n 0%, 50% { opacity: 1; }\n 51%, 100% { opacity: 0; }\n}\n\n/* Style scrollbar */\n::-webkit-scrollbar {\n width: 8px;\n background: #0a0a0a;\n}\n\n::-webkit-scrollbar-thumb {\n background: #33ff33;\n}\n\n/* Output textboxes */\n.output-class textarea {\n color: #33ff33 !important;\n font-family: 'VT323', 'Courier New', monospace !important;\n}\n\n/* HR divider */\nhr {\n border: none;\n border-top: 1px dashed rgba(51, 255, 51, 0.3);\n}", "embed_radius": "*radius_sm", "error_background_fill": "#fef2f2", "error_background_fill_dark": "*background_fill_primary", "error_border_color": "#b91c1c", "error_border_color_dark": "#ef4444", "error_border_width": "1px", "error_icon_color": "#b91c1c", "error_icon_color_dark": "#ef4444", "error_text_color": "#b91c1c", "error_text_color_dark": "#fef2f2", "font": "'VT323', Courier New, monospace", "font_mono": "'VT323', Courier New, monospace", "form_gap_width": "0px", "input_background_fill": "transparent", "input_background_fill_dark": "transparent", "input_background_fill_focus": "*input_background_fill", "input_background_fill_hover": "*input_background_fill", "input_background_fill_hover_dark": "*input_background_fill", "input_border_color": "#33ff33", "input_border_color_dark": "*border_color_primary", "input_border_color_focus": "#33ff33", "input_border_color_focus_dark": "*neutral_700", "input_border_color_hover": "*input_border_color", "input_border_color_hover_dark": "*input_border_color", "input_border_width": "0px", "input_padding": "*spacing_xl", "input_placeholder_color": "*neutral_400", "input_placeholder_color_dark": "*neutral_500", "input_radius": "*radius_sm", "input_shadow": "none", "input_shadow_focus": "*input_shadow", "input_text_size": "*text_md", "input_text_weight": "400", "layout_gap": "*spacing_xxl", "link_text_color": "#33ff33", "link_text_color_active": "*secondary_600", "link_text_color_active_dark": "*secondary_500", "link_text_color_dark": "*secondary_500", "link_text_color_hover": "#66ff66", "link_text_color_hover_dark": "*secondary_400", "link_text_color_visited": "*secondary_500", "link_text_color_visited_dark": "*secondary_600", "loader_color": "*color_accent", "name": "terminal", "neutral_100": "#f4f4f5", "neutral_200": "#e4e4e7", "neutral_300": "#d4d4d8", "neutral_400": "#bbbbc2", "neutral_50": "#fafafa", "neutral_500": "#71717a", "neutral_600": "#52525b", "neutral_700": "#3f3f46", "neutral_800": "#27272a", "neutral_900": "#18181b", "neutral_950": "#0f0f11", "panel_background_fill": "*background_fill_secondary", "panel_background_fill_dark": "*background_fill_secondary", "panel_border_color": "*border_color_primary", "panel_border_color_dark": "*border_color_primary", "panel_border_width": "0", "primary_100": "#dcfce7", "primary_200": "#bbf7d0", "primary_300": "#86efac", "primary_400": "#4ade80", "primary_50": "#f0fdf4", "primary_500": "#22c55e", "primary_600": "#16a34a", "primary_700": "#15803d", "primary_800": "#166534", "primary_900": "#14532d", "primary_950": "#134e28", "prose_header_text_weight": "600", "prose_text_size": "*text_md", "prose_text_weight": "400", "radio_circle": "url(\"data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e\")", "radius_lg": "0px", "radius_md": "0px", "radius_sm": "0px", "radius_xl": "0px", "radius_xs": "0px", "radius_xxl": "0px", "radius_xxs": "0px", "secondary_100": "#dcfce7", "secondary_200": "#bbf7d0", "secondary_300": "#86efac", "secondary_400": "#4ade80", "secondary_50": "#f0fdf4", "secondary_500": "#22c55e", "secondary_600": "#16a34a", "secondary_700": "#15803d", "secondary_800": "#166534", "secondary_900": "#14532d", "secondary_950": "#134e28", "section_header_text_size": "*text_md", "section_header_text_weight": "400", "shadow_drop": "none", "shadow_drop_lg": "none", "shadow_inset": "rgba(0,0,0,0.05) 0px 2px 4px 0px inset", "shadow_spread": "3px", "shadow_spread_dark": "1px", "slider_color": "*color_accent", "spacing_lg": "8px", "spacing_md": "6px", "spacing_sm": "4px", "spacing_xl": "10px", "spacing_xs": "2px", "spacing_xxl": "16px", "spacing_xxs": "1px", "stat_background_fill": "*primary_300", "stat_background_fill_dark": "*primary_500", "table_border_color": "*neutral_300", "table_border_color_dark": "*neutral_700", "table_even_background_fill": "white", "table_even_background_fill_dark": "*neutral_950", "table_odd_background_fill": "*neutral_50", "table_odd_background_fill_dark": "*neutral_900", "table_radius": "*radius_sm", "table_row_focus": "*color_accent_soft", "table_row_focus_dark": "*color_accent_soft", "table_text_color": "*body_text_color", "table_text_color_dark": "*body_text_color", "text_lg": "16px", "text_md": "14px", "text_sm": "12px", "text_xl": "22px", "text_xs": "10px", "text_xxl": "26px", "text_xxs": "9px"}, "gradio_version": "6.9.0", "version": {"version": "0.0.3"}}
|