UjjwalKGupta commited on
Commit
6e0a1c7
·
verified ·
1 Parent(s): c238055

Change Theme Color

Browse files
Files changed (1) hide show
  1. app.py +8 -2
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
- # --- Gradio UI Definition ---
500
- with gr.Blocks(theme=gr.themes.Soft(background_fill_primary="white"), title="Kamlan: KML Analyzer") as demo:
 
 
 
 
 
 
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()