Spaces:
Sleeping
Sleeping
add additional customization to gradio ui theme
Browse files
main.py
CHANGED
|
@@ -25,6 +25,21 @@ EXAMPLES = [
|
|
| 25 |
theme = gr.themes.Soft(
|
| 26 |
primary_hue="blue",
|
| 27 |
secondary_hue="neutral",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
)
|
| 29 |
|
| 30 |
# Create Gradio interface
|
|
|
|
| 25 |
theme = gr.themes.Soft(
|
| 26 |
primary_hue="blue",
|
| 27 |
secondary_hue="neutral",
|
| 28 |
+
).set(
|
| 29 |
+
# Customize specific theme elements
|
| 30 |
+
button_primary_background_fill="*primary_500",
|
| 31 |
+
button_primary_background_fill_dark="*primary_600",
|
| 32 |
+
|
| 33 |
+
# Alert colors that work in both light/dark modes
|
| 34 |
+
error_background_fill="*error_50",
|
| 35 |
+
error_background_fill_dark="*error_900",
|
| 36 |
+
error_text_color="*error_700",
|
| 37 |
+
error_text_color_dark="*error_200",
|
| 38 |
+
|
| 39 |
+
warning_background_fill="*warning_50",
|
| 40 |
+
warning_background_fill_dark="*warning_900",
|
| 41 |
+
warning_text_color="*warning_700",
|
| 42 |
+
warning_text_color_dark="*warning_200"
|
| 43 |
)
|
| 44 |
|
| 45 |
# Create Gradio interface
|