prithivMLmods commited on
Commit
b843ea0
·
verified ·
1 Parent(s): 360dbdd

update app

Browse files
Files changed (1) hide show
  1. app.py +27 -27
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.plum = colors.Color(
13
- name="plum",
14
- c50="#FDF4FD",
15
- c100="#F7E6F7",
16
- c200="#ECD0EC",
17
- c300="#DDA0DD",
18
- c400="#C98BC9",
19
- c500="#B060B0",
20
- c600="#964B96",
21
- c700="#7A3A7A",
22
- c800="#602C60",
23
- c900="#451E45",
24
- c950="#2B122B",
25
  )
26
 
27
- class PlumTheme(Soft):
28
  def __init__(
29
  self,
30
  *,
31
- primary_hue: colors.Color | str = colors.plum,
32
- secondary_hue: colors.Color | str = colors.plum,
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] = (
@@ -47,25 +47,25 @@ class PlumTheme(Soft):
47
  font=font,
48
  font_mono=font_mono,
49
  )
50
- self.set(
51
  background_fill_primary="*primary_50",
52
  background_fill_primary_dark="*primary_900",
53
- body_background_fill="linear-gradient(135deg, *primary_100, *primary_50)",
54
  body_background_fill_dark="linear-gradient(135deg, *primary_900, *primary_800)",
55
  button_primary_text_color="white",
56
  button_primary_text_color_hover="white",
57
- button_primary_background_fill="linear-gradient(90deg, *primary_500, *primary_600)",
58
- button_primary_background_fill_hover="linear-gradient(90deg, *primary_600, *primary_700)",
59
- button_primary_background_fill_dark="linear-gradient(90deg, *primary_600, *primary_800)",
60
- button_primary_background_fill_hover_dark="linear-gradient(90deg, *primary_500, *primary_500)",
61
  button_secondary_text_color="black",
62
  button_secondary_text_color_hover="white",
63
- button_secondary_background_fill="linear-gradient(90deg, *primary_200, *primary_200)",
64
  button_secondary_background_fill_hover="linear-gradient(90deg, *primary_400, *primary_400)",
65
  button_secondary_background_fill_dark="linear-gradient(90deg, *primary_500, *primary_600)",
66
  button_secondary_background_fill_hover_dark="linear-gradient(90deg, *primary_500, *primary_500)",
67
- slider_color="*primary_500",
68
- slider_color_dark="*primary_600",
69
  block_title_text_weight="600",
70
  block_border_width="3px",
71
  block_shadow="*shadow_drop_lg",
@@ -75,7 +75,7 @@ class PlumTheme(Soft):
75
  block_label_background_fill="*primary_200",
76
  )
77
 
78
- plum_theme = PlumTheme()
79
 
80
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
81
  dtype = torch.bfloat16
@@ -230,7 +230,7 @@ css="""
230
  #main-title h1 {font-size: 2.1em !important;}
231
  """
232
 
233
- with gr.Blocks(css=css, theme=plum_theme) as demo:
234
  with gr.Column(elem_id="col-container"):
235
  gr.Markdown("# **Qwen-Image-Edit-2509-LoRAs-Fast-Fusion**", elem_id="main-title")
236
  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.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,
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] = (
 
47
  font=font,
48
  font_mono=font_mono,
49
  )
50
+ super().set(
51
  background_fill_primary="*primary_50",
52
  background_fill_primary_dark="*primary_900",
53
+ body_background_fill="linear-gradient(135deg, *primary_200, *primary_100)",
54
  body_background_fill_dark="linear-gradient(135deg, *primary_900, *primary_800)",
55
  button_primary_text_color="white",
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)",
64
  button_secondary_background_fill_hover="linear-gradient(90deg, *primary_400, *primary_400)",
65
  button_secondary_background_fill_dark="linear-gradient(90deg, *primary_500, *primary_600)",
66
  button_secondary_background_fill_hover_dark="linear-gradient(90deg, *primary_500, *primary_500)",
67
+ slider_color="*secondary_500",
68
+ slider_color_dark="*secondary_600",
69
  block_title_text_weight="600",
70
  block_border_width="3px",
71
  block_shadow="*shadow_drop_lg",
 
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
  dtype = torch.bfloat16
 
230
  #main-title h1 {font-size: 2.1em !important;}
231
  """
232
 
233
+ with gr.Blocks(css=css, theme=orange_red_theme) as demo:
234
  with gr.Column(elem_id="col-container"):
235
  gr.Markdown("# **Qwen-Image-Edit-2509-LoRAs-Fast-Fusion**", elem_id="main-title")
236
  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.")