Zaiiida commited on
Commit
61badd0
·
verified ·
1 Parent(s): 2623970

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +28 -10
app.py CHANGED
@@ -236,17 +236,35 @@ def update_foreground_ratio(img_proc, fr):
236
  gr.update(value=show_mask_img(foreground_res)),
237
  )
238
 
239
- # Corrected CustomTheme class
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
240
  class CustomTheme(gr.themes.Base):
241
- primary_hue = gr.themes.Color("#191a1e")
242
- background_fill_primary = gr.themes.Color("#191a1e")
243
- background_fill_secondary = gr.themes.Color("#191a1e")
244
- background_fill_tertiary = gr.themes.Color("#191a1e")
245
- text_color_primary = gr.themes.Color("#FFFFFF")
246
- text_color_secondary = gr.themes.Color("#FFFFFF")
247
- text_color_tertiary = gr.themes.Color("#FFFFFF")
248
- input_background_fill = gr.themes.Color("#191a1e")
249
- input_text_color = gr.themes.Color("#FFFFFF")
250
 
251
  css = """
252
  /* Apply background color to the entire page */
 
236
  gr.update(value=show_mask_img(foreground_res)),
237
  )
238
 
239
+ # Generate color shades for the primary hue
240
+ from gradio.themes.colors import Color
241
+
242
+ primary_hue_color = Color(
243
+ name="custom",
244
+ c50="#e7e7e8",
245
+ c100="#c2c2c4",
246
+ c200="#9d9da0",
247
+ c300="#78787b",
248
+ c400="#525357",
249
+ c500="#2d2e33",
250
+ c600="#191a1e", # Base color
251
+ c700="#141517",
252
+ c800="#0f1012",
253
+ c900="#0a0a0c",
254
+ c950="#050506",
255
+ )
256
+
257
+ # Define the custom theme
258
  class CustomTheme(gr.themes.Base):
259
+ primary_hue = primary_hue_color
260
+ background_fill_primary = "#191a1e"
261
+ background_fill_secondary = "#191a1e"
262
+ background_fill_tertiary = "#191a1e"
263
+ text_color_primary = "#FFFFFF"
264
+ text_color_secondary = "#FFFFFF"
265
+ text_color_tertiary = "#FFFFFF"
266
+ input_background_fill = "#191a1e"
267
+ input_text_color = "#FFFFFF"
268
 
269
  css = """
270
  /* Apply background color to the entire page */