Spaces:
Sleeping
Sleeping
File size: 1,282 Bytes
fd55c28 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
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()
|