Spaces:
Runtime error
Runtime error
import gradio as gr | |
import argparse | |
# Call file with incremented version number and hf access token | |
parser = argparse.ArgumentParser() | |
parser.add_argument("--version") | |
parser.add_argument("--token") | |
args = parser.parse_args() | |
# Gradio theme | |
theme = gr.themes.Base( | |
primary_hue=gr.themes.Color(c50="#217cbb", c100="#217cbb", c200="#217cbb", c300="#217cbb", c400="#217cbb", c500="#0063a3", c600="#0063a3", c700="#0063a3", c800="#0e416c", c900="#0e416c", c950="#0e416c"), | |
secondary_hue=gr.themes.Color(c50="#fec157", c100="#fec157", c200="#fec157", c300="#fec157", c400="#fec157", c500="#fbad26", c600="#fbad26", c700="#fbad26", c800="#e49325", c900="#e49325", c950="#e49325"), | |
neutral_hue=gr.themes.Color(c50="#f1f1f6", c100="#f1f1f6", c200="#b7b9c3", c300="#a3a6b1", c400="#90939f", c500="#7d808d", c600="#6a6e79", c700="#585c65", c800="#454b52", c900="#353a40", c950="#24292d"), | |
).set( | |
button_secondary_background_fill="#0063a3", | |
button_secondary_background_fill_hover="#004f83", | |
button_secondary_text_color="#ffffff", | |
button_secondary_background_fill_dark="#0063a3", | |
button_secondary_background_fill_hover_dark="#004f83", | |
button_secondary_text_color_dark="#ffffff", | |
button_primary_background_fill="#fbad26", | |
button_primary_background_fill_hover="#e49325", | |
button_primary_text_color="#ffffff", | |
button_primary_background_fill_dark="#fbad26", | |
button_primary_background_fill_hover_dark="#e49325", | |
button_primary_text_color_dark="#ffffff", | |
checkbox_background_color_selected = "#0063a3", | |
checkbox_background_color_selected_dark = "#0063a3", | |
checkbox_border_color = "#0063a3", | |
checkbox_border_color_dark = "#0063a3", | |
checkbox_border_color_focus = "#0063a3", | |
checkbox_border_color_focus_dark = "#0063a3", | |
checkbox_border_color_hover = "#0063a3", | |
checkbox_border_color_hover_dark = "#0063a3", | |
checkbox_border_color_selected = "#0063a3", | |
checkbox_border_color_selected_dark = "#0063a3", | |
checkbox_label_background_fill = "#b7b9c3", | |
checkbox_label_background_fill_dark = "#fbad26", | |
checkbox_label_background_fill_hover = "#b7b9c3", | |
checkbox_label_background_fill_hover_dark = "#fbad26", | |
checkbox_label_background_fill_selected = "#b7b9c3", | |
checkbox_label_background_fill_selected_dark = "#fbad26", | |
checkbox_label_text_color="#ffffff", | |
checkbox_label_text_color_dark="#ffffff", | |
slider_color="#0063a3", | |
slider_color_dark="#0063a3", | |
link_text_color = "#217cbb", | |
link_text_color_dark = "#217cbb", | |
link_text_color_active = "#217cbb", | |
link_text_color_active_dark = "#217cbb", | |
link_text_color_hover = "#0063a3", | |
link_text_color_hover_dark = "#0063a3", | |
link_text_color_visited = "#0e416c", | |
link_text_color_visited_dark = "#0e416c" | |
) | |
theme.push_to_hub( | |
repo_name = 'trimble_ai_theme', | |
org_name = 'trimble', | |
version = args.version, | |
hf_token = args.token | |
) | |
# code to manually generation theme json file | |
#filename = "theme_schema@{}.json".format(args.version) | |
#theme.dump(filename) |