prithivMLmods commited on
Commit
77992e1
·
verified ·
1 Parent(s): 8c7aaea

update app

Browse files
Files changed (1) hide show
  1. app.py +73 -1
app.py CHANGED
@@ -30,6 +30,78 @@ from huggingface_hub import (
30
  from diffusers.utils import load_image
31
  from typing import Iterable
32
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  def calculate_shift(
34
  image_seq_len,
35
  base_seq_len: int = 256,
@@ -1346,4 +1418,4 @@ with gr.Blocks(delete_cache=(60, 60)) as demo:
1346
  )
1347
 
1348
  demo.queue()
1349
- demo.launch(theme="JohnSmith9982/small_and_pretty", css=css, mcp_server=True, ssr_mode=False, show_error=True)
 
30
  from diffusers.utils import load_image
31
  from typing import Iterable
32
 
33
+ from gradio.themes import Soft
34
+ from gradio.themes.utils import colors, fonts, sizes
35
+
36
+ colors.steel_blue = colors.Color(
37
+ name="steel_blue",
38
+ c50="#EBF3F8",
39
+ c100="#D3E5F0",
40
+ c200="#A8CCE1",
41
+ c300="#7DB3D2",
42
+ c400="#529AC3",
43
+ c500="#4682B4",
44
+ c600="#3E72A0",
45
+ c700="#36638C",
46
+ c800="#2E5378",
47
+ c900="#264364",
48
+ c950="#1E3450",
49
+ )
50
+
51
+ class SteelBlueTheme(Soft):
52
+ def __init__(
53
+ self,
54
+ *,
55
+ primary_hue: colors.Color | str = colors.gray,
56
+ secondary_hue: colors.Color | str = colors.steel_blue,
57
+ neutral_hue: colors.Color | str = colors.slate,
58
+ text_size: sizes.Size | str = sizes.text_lg,
59
+ font: fonts.Font | str | Iterable[fonts.Font | str] = (
60
+ fonts.GoogleFont("Outfit"), "Arial", "sans-serif",
61
+ ),
62
+ font_mono: fonts.Font | str | Iterable[fonts.Font | str] = (
63
+ fonts.GoogleFont("IBM Plex Mono"), "ui-monospace", "monospace",
64
+ ),
65
+ ):
66
+ super().__init__(
67
+ primary_hue=primary_hue,
68
+ secondary_hue=secondary_hue,
69
+ neutral_hue=neutral_hue,
70
+ text_size=text_size,
71
+ font=font,
72
+ font_mono=font_mono,
73
+ )
74
+ super().set(
75
+ background_fill_primary="*primary_50",
76
+ background_fill_primary_dark="*primary_900",
77
+ body_background_fill="linear-gradient(135deg, *primary_200, *primary_100)",
78
+ body_background_fill_dark="linear-gradient(135deg, *primary_900, *primary_800)",
79
+ button_primary_text_color="white",
80
+ button_primary_text_color_hover="white",
81
+ button_primary_background_fill="linear-gradient(90deg, *secondary_500, *secondary_600)",
82
+ button_primary_background_fill_hover="linear-gradient(90deg, *secondary_600, *secondary_700)",
83
+ button_primary_background_fill_dark="linear-gradient(90deg, *secondary_600, *secondary_800)",
84
+ button_primary_background_fill_hover_dark="linear-gradient(90deg, *secondary_500, *secondary_500)",
85
+ button_secondary_text_color="black",
86
+ button_secondary_text_color_hover="white",
87
+ button_secondary_background_fill="linear-gradient(90deg, *primary_300, *primary_300)",
88
+ button_secondary_background_fill_hover="linear-gradient(90deg, *primary_400, *primary_400)",
89
+ button_secondary_background_fill_dark="linear-gradient(90deg, *primary_500, *primary_600)",
90
+ button_secondary_background_fill_hover_dark="linear-gradient(90deg, *primary_500, *primary_500)",
91
+ slider_color="*secondary_500",
92
+ slider_color_dark="*secondary_600",
93
+ block_title_text_weight="600",
94
+ block_border_width="3px",
95
+ block_shadow="*shadow_drop_lg",
96
+ button_primary_shadow="*shadow_drop_lg",
97
+ button_large_padding="11px",
98
+ color_accent_soft="*primary_100",
99
+ block_label_background_fill="*primary_200",
100
+ )
101
+
102
+ steel_blue_theme = SteelBlueTheme()
103
+
104
+
105
  def calculate_shift(
106
  image_seq_len,
107
  base_seq_len: int = 256,
 
1418
  )
1419
 
1420
  demo.queue()
1421
+ demo.launch(theme=steel_blue_theme, css=css, mcp_server=True, ssr_mode=False, show_error=True)