Spaces:
Sleeping
Sleeping
import gradio as gr | |
from gradio.themes.default import Default | |
class SimpleModern(Default): | |
def __init__(self): | |
super().__init__( | |
primary_hue="blue", | |
secondary_hue="gray", | |
neutral_hue="white", | |
font=("Helvetica", "Arial", "sans-serif"), | |
font_mono=("Courier New", "Courier", "monospace"), | |
spacing_size="md", | |
radius_size="md", | |
text_size="md", | |
) | |
self.name = "SimpleModern" | |
self.set( | |
background_fill_primary="#f5f5f5", | |
background_fill_secondary="#ffffff", | |
block_background_fill="#ffffff", | |
block_border_color="#e0e0e0", | |
block_shadow="none", | |
button_primary_background_fill="#007bff", | |
button_primary_text_color="#ffffff", | |
input_background_fill="#ffffff", | |
input_border_color="#ced4da", | |
input_text_color="#495057", | |
link_text_color="#007bff", | |
body_text_color="#212529", | |
) | |
# Assuming SimpleModern is your custom theme class | |
demo = gr.Interface( | |
fn=your_function, | |
inputs=gr.inputs.Textbox(), | |
outputs=gr.outputs.Textbox(), | |
theme=SimpleModern(), | |
title="Test App", | |
) | |
demo.launch() | |