prithivMLmods commited on
Commit
19889e2
·
verified ·
1 Parent(s): 4341758

update app

Browse files
Files changed (1) hide show
  1. app.py +22 -29
app.py CHANGED
@@ -30,35 +30,28 @@ from gradio.themes.utils import colors, fonts, sizes
30
 
31
  # --- Theme and CSS Definition ---
32
 
33
- # Define the Thistle color palette
34
- colors.thistle = colors.Color(
35
- name="thistle",
36
- c50="#F9F5F9",
37
- c100="#F0E8F1",
38
- c200="#E7DBE8",
39
- c300="#DECEE0",
40
- c400="#D2BFD8",
41
- c500="#D8BFD8", # Thistle base color
42
- c600="#B59CB7",
43
- c700="#927996",
44
- c800="#6F5675",
45
- c900="#4C3454",
46
- c950="#291233",
47
  )
48
 
49
- colors.red_gray = colors.Color(
50
- name="red_gray",
51
- c50="#f7eded", c100="#f5dcdc", c200="#efb4b4", c300="#e78f8f",
52
- c400="#d96a6a", c500="#c65353", c600="#b24444", c700="#8f3434",
53
- c800="#732d2d", c900="#5f2626", c950="#4d2020",
54
- )
55
-
56
- class ThistleTheme(Soft):
57
  def __init__(
58
  self,
59
  *,
60
  primary_hue: colors.Color | str = colors.gray,
61
- secondary_hue: colors.Color | str = colors.thistle, # Use the new color
62
  neutral_hue: colors.Color | str = colors.slate,
63
  text_size: sizes.Size | str = sizes.text_lg,
64
  font: fonts.Font | str | Iterable[fonts.Font | str] = (
@@ -81,10 +74,10 @@ class ThistleTheme(Soft):
81
  background_fill_primary_dark="*primary_900",
82
  body_background_fill="linear-gradient(135deg, *primary_200, *primary_100)",
83
  body_background_fill_dark="linear-gradient(135deg, *primary_900, *primary_800)",
84
- button_primary_text_color="black",
85
  button_primary_text_color_hover="white",
86
- button_primary_background_fill="linear-gradient(90deg, *secondary_400, *secondary_500)",
87
- button_primary_background_fill_hover="linear-gradient(90deg, *secondary_500, *secondary_600)",
88
  button_primary_background_fill_dark="linear-gradient(90deg, *secondary_600, *secondary_700)",
89
  button_primary_background_fill_hover_dark="linear-gradient(90deg, *secondary_500, *secondary_600)",
90
  button_secondary_text_color="black",
@@ -93,7 +86,7 @@ class ThistleTheme(Soft):
93
  button_secondary_background_fill_hover="linear-gradient(90deg, *primary_400, *primary_400)",
94
  button_secondary_background_fill_dark="linear-gradient(90deg, *primary_500, *primary_600)",
95
  button_secondary_background_fill_hover_dark="linear-gradient(90deg, *primary_500, *primary_500)",
96
- slider_color="*secondary_400",
97
  slider_color_dark="*secondary_600",
98
  block_title_text_weight="600",
99
  block_border_width="3px",
@@ -105,7 +98,7 @@ class ThistleTheme(Soft):
105
  )
106
 
107
  # Instantiate the new theme
108
- thistle_theme = ThistleTheme()
109
 
110
  css = """
111
  #main-title h1 {
@@ -389,7 +382,7 @@ gif_examples = [["Describe this GIF.", "examples/gifs/1.gif"],
389
  caption_examples = [["examples/captions/1.JPG"],
390
  ["examples/captions/2.jpeg"], ["examples/captions/3.jpeg"]]
391
 
392
- with gr.Blocks(theme=thistle_theme, css=css) as demo:
393
  pdf_state = gr.State(value=get_initial_pdf_state())
394
  gr.Markdown("# **Qwen-3VL:Multimodal**", elem_id="main-title")
395
  with gr.Row():
 
30
 
31
  # --- Theme and CSS Definition ---
32
 
33
+ # Define the new OrangeRed color palette
34
+ colors.orange_red = colors.Color(
35
+ name="orange_red",
36
+ c50="#FFF0E5",
37
+ c100="#FFE0CC",
38
+ c200="#FFC299",
39
+ c300="#FFA366",
40
+ c400="#FF8533",
41
+ c500="#FF4500", # OrangeRed base color
42
+ c600="#E63E00",
43
+ c700="#CC3700",
44
+ c800="#B33000",
45
+ c900="#992900",
46
+ c950="#802200",
47
  )
48
 
49
+ class OrangeRedTheme(Soft):
 
 
 
 
 
 
 
50
  def __init__(
51
  self,
52
  *,
53
  primary_hue: colors.Color | str = colors.gray,
54
+ secondary_hue: colors.Color | str = colors.orange_red, # Use the new color
55
  neutral_hue: colors.Color | str = colors.slate,
56
  text_size: sizes.Size | str = sizes.text_lg,
57
  font: fonts.Font | str | Iterable[fonts.Font | str] = (
 
74
  background_fill_primary_dark="*primary_900",
75
  body_background_fill="linear-gradient(135deg, *primary_200, *primary_100)",
76
  body_background_fill_dark="linear-gradient(135deg, *primary_900, *primary_800)",
77
+ button_primary_text_color="white",
78
  button_primary_text_color_hover="white",
79
+ button_primary_background_fill="linear-gradient(90deg, *secondary_500, *secondary_600)",
80
+ button_primary_background_fill_hover="linear-gradient(90deg, *secondary_600, *secondary_700)",
81
  button_primary_background_fill_dark="linear-gradient(90deg, *secondary_600, *secondary_700)",
82
  button_primary_background_fill_hover_dark="linear-gradient(90deg, *secondary_500, *secondary_600)",
83
  button_secondary_text_color="black",
 
86
  button_secondary_background_fill_hover="linear-gradient(90deg, *primary_400, *primary_400)",
87
  button_secondary_background_fill_dark="linear-gradient(90deg, *primary_500, *primary_600)",
88
  button_secondary_background_fill_hover_dark="linear-gradient(90deg, *primary_500, *primary_500)",
89
+ slider_color="*secondary_500",
90
  slider_color_dark="*secondary_600",
91
  block_title_text_weight="600",
92
  block_border_width="3px",
 
98
  )
99
 
100
  # Instantiate the new theme
101
+ orange_red_theme = OrangeRedTheme()
102
 
103
  css = """
104
  #main-title h1 {
 
382
  caption_examples = [["examples/captions/1.JPG"],
383
  ["examples/captions/2.jpeg"], ["examples/captions/3.jpeg"]]
384
 
385
+ with gr.Blocks(theme=orange_red_theme, css=css) as demo:
386
  pdf_state = gr.State(value=get_initial_pdf_state())
387
  gr.Markdown("# **Qwen-3VL:Multimodal**", elem_id="main-title")
388
  with gr.Row():