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="#dcedf9", 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_primary_background_fill="#217cbb", | |
button_primary_background_fill_hover="#0063a3", | |
button_primary_text_color="#ffffff", | |
button_primary_background_fill_dark="#217cbb", | |
button_primary_background_fill_hover_dark="#0063a3", | |
button_primary_text_color_dark="#ffffff", | |
button_secondary_background_fill="#cbcdd6", | |
button_secondary_background_fill_hover="#a3a6b1", | |
button_secondary_text_color="#252a2e", | |
button_secondary_background_fill_dark="#6a6e79", | |
button_secondary_background_fill_hover_dark="#252a2e", | |
button_secondary_text_color_dark="#ffffff", | |
checkbox_background_color_selected = "#217cbb", | |
checkbox_background_color_selected_dark = "#217cbb", | |
checkbox_border_color = "#217cbb", | |
checkbox_border_color_dark = "#217cbb", | |
checkbox_border_color_focus = "#217cbb", | |
checkbox_border_color_focus_dark = "#217cbb", | |
checkbox_border_color_hover = "#217cbb", | |
checkbox_border_color_hover_dark = "#217cbb", | |
checkbox_border_color_selected = "#217cbb", | |
checkbox_border_color_selected_dark = "#217cbb", | |
checkbox_label_background_fill = "#cbcdd6", | |
checkbox_label_background_fill_dark = "#6a6e79", | |
checkbox_label_background_fill_hover = "#cbcdd6", | |
checkbox_label_background_fill_hover_dark = "#6a6e79", | |
checkbox_label_background_fill_selected = "#cbcdd6", | |
checkbox_label_background_fill_selected_dark = "#6a6e79", | |
checkbox_label_text_color="#252a2e", | |
checkbox_label_text_color_dark="#ffffff", | |
slider_color="#217cbb", | |
slider_color_dark="#217cbb", | |
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 = "#217cbb", | |
link_text_color_visited_dark = "#217cbb" | |
) | |
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) |