prithivMLmods commited on
Commit
db296ae
·
verified ·
1 Parent(s): def5fc4

update app

Browse files
Files changed (1) hide show
  1. app.py +19 -19
app.py CHANGED
@@ -9,27 +9,27 @@ from typing import Iterable
9
  from gradio.themes import Soft
10
  from gradio.themes.utils import colors, fonts, sizes
11
 
12
- colors.orange_red = colors.Color(
13
- name="orange_red",
14
- c50="#FFF0E5",
15
- c100="#FFE0CC",
16
- c200="#FFC299",
17
- c300="#FFA366",
18
- c400="#FF8533",
19
- c500="#FF4500",
20
- c600="#E63E00",
21
- c700="#CC3700",
22
- c800="#B33000",
23
- c900="#992900",
24
- c950="#802200",
25
  )
26
 
27
- class OrangeRedTheme(Soft):
28
  def __init__(
29
  self,
30
  *,
31
  primary_hue: colors.Color | str = colors.gray,
32
- secondary_hue: colors.Color | str = colors.orange_red, # Use the new color
33
  neutral_hue: colors.Color | str = colors.slate,
34
  text_size: sizes.Size | str = sizes.text_lg,
35
  font: fonts.Font | str | Iterable[fonts.Font | str] = (
@@ -56,8 +56,8 @@ class OrangeRedTheme(Soft):
56
  button_primary_text_color_hover="white",
57
  button_primary_background_fill="linear-gradient(90deg, *secondary_500, *secondary_600)",
58
  button_primary_background_fill_hover="linear-gradient(90deg, *secondary_600, *secondary_700)",
59
- button_primary_background_fill_dark="linear-gradient(90deg, *secondary_600, *secondary_700)",
60
- button_primary_background_fill_hover_dark="linear-gradient(90deg, *secondary_500, *secondary_600)",
61
  button_secondary_text_color="black",
62
  button_secondary_text_color_hover="white",
63
  button_secondary_background_fill="linear-gradient(90deg, *primary_300, *primary_300)",
@@ -75,7 +75,7 @@ class OrangeRedTheme(Soft):
75
  block_label_background_fill="*primary_200",
76
  )
77
 
78
- orange_red_theme = OrangeRedTheme()
79
 
80
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
81
 
@@ -187,7 +187,7 @@ css="""
187
  #main-title h1 {font-size: 2.1em !important;}
188
  """
189
 
190
- with gr.Blocks(css=css, theme=orange_red_theme) as demo:
191
  with gr.Column(elem_id="col-container"):
192
  gr.Markdown("# **Qwen-Image-Edit-2509-LoRAs-Fast**", elem_id="main-title")
193
  gr.Markdown("Perform diverse image edits using specialized [LoRA](https://huggingface.co/models?other=base_model:adapter:Qwen/Qwen-Image-Edit-2509) adapters for the [Qwen-Image-Edit](https://huggingface.co/Qwen/Qwen-Image-Edit-2509) model.")
 
9
  from gradio.themes import Soft
10
  from gradio.themes.utils import colors, fonts, sizes
11
 
12
+ colors.steel_blue = colors.Color(
13
+ name="steel_blue",
14
+ c50="#EBF3F8",
15
+ c100="#D3E5F0",
16
+ c200="#A8CCE1",
17
+ c300="#7DB3D2",
18
+ c400="#529AC3",
19
+ c500="#4682B4",
20
+ c600="#3E72A0",
21
+ c700="#36638C",
22
+ c800="#2E5378",
23
+ c900="#264364",
24
+ c950="#1E3450",
25
  )
26
 
27
+ class SteelBlueTheme(Soft):
28
  def __init__(
29
  self,
30
  *,
31
  primary_hue: colors.Color | str = colors.gray,
32
+ secondary_hue: colors.Color | str = colors.steel_blue,
33
  neutral_hue: colors.Color | str = colors.slate,
34
  text_size: sizes.Size | str = sizes.text_lg,
35
  font: fonts.Font | str | Iterable[fonts.Font | str] = (
 
56
  button_primary_text_color_hover="white",
57
  button_primary_background_fill="linear-gradient(90deg, *secondary_500, *secondary_600)",
58
  button_primary_background_fill_hover="linear-gradient(90deg, *secondary_600, *secondary_700)",
59
+ button_primary_background_fill_dark="linear-gradient(90deg, *secondary_600, *secondary_800)",
60
+ button_primary_background_fill_hover_dark="linear-gradient(90deg, *secondary_500, *secondary_500)",
61
  button_secondary_text_color="black",
62
  button_secondary_text_color_hover="white",
63
  button_secondary_background_fill="linear-gradient(90deg, *primary_300, *primary_300)",
 
75
  block_label_background_fill="*primary_200",
76
  )
77
 
78
+ steel_blue_theme = SteelBlueTheme()
79
 
80
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
81
 
 
187
  #main-title h1 {font-size: 2.1em !important;}
188
  """
189
 
190
+ with gr.Blocks(css=css, theme=steel_blue_theme) as demo:
191
  with gr.Column(elem_id="col-container"):
192
  gr.Markdown("# **Qwen-Image-Edit-2509-LoRAs-Fast**", elem_id="main-title")
193
  gr.Markdown("Perform diverse image edits using specialized [LoRA](https://huggingface.co/models?other=base_model:adapter:Qwen/Qwen-Image-Edit-2509) adapters for the [Qwen-Image-Edit](https://huggingface.co/Qwen/Qwen-Image-Edit-2509) model.")