Change Theme Color
Browse files
app.py
CHANGED
|
@@ -496,8 +496,14 @@ def calculate_indices(
|
|
| 496 |
traceback.print_exc()
|
| 497 |
return f"An error occurred during calculation: {e}", None, None, None
|
| 498 |
|
| 499 |
-
#
|
| 500 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 501 |
# Hidden state to store geometry data
|
| 502 |
geometry_data = gr.State()
|
| 503 |
buffer_geometry_data = gr.State()
|
|
|
|
| 496 |
traceback.print_exc()
|
| 497 |
return f"An error occurred during calculation: {e}", None, None, None
|
| 498 |
|
| 499 |
+
# First, create an instance of the Soft theme
|
| 500 |
+
theme = gr.themes.Soft()
|
| 501 |
+
|
| 502 |
+
# Then, directly modify the attribute for the primary background color
|
| 503 |
+
theme.background_fill_primary = "white"
|
| 504 |
+
|
| 505 |
+
# Finally, pass the fully customized theme object to your Gradio Blocks
|
| 506 |
+
with gr.Blocks(theme=theme, title="Kamlan: KML Analyzer") as demo:
|
| 507 |
# Hidden state to store geometry data
|
| 508 |
geometry_data = gr.State()
|
| 509 |
buffer_geometry_data = gr.State()
|