prithivMLmods commited on
Commit
1d7b167
·
verified ·
1 Parent(s): d2cfb56

update app

Browse files
Files changed (1) hide show
  1. app.py +23 -14
app.py CHANGED
@@ -25,19 +25,28 @@ from transformers.image_utils import load_image
25
  from gradio.themes import Soft
26
  from gradio.themes.utils import colors, fonts, sizes
27
 
28
- colors.thistle = colors.Color(
29
- name="thistle",
30
- c50="#F9F5F9", c100="#F0E8F1", c200="#E7DBE8", c300="#DECEE0",
31
- c400="#D2BFD8", c500="#D8BFD8", c600="#B59CB7", c700="#927996",
32
- c800="#6F5675", c900="#4C3454", c950="#291233",
 
 
 
 
 
 
 
 
33
  )
34
 
35
- class ThistleTheme(Soft):
 
36
  def __init__(
37
  self,
38
  *,
39
  primary_hue: colors.Color | str = colors.gray,
40
- secondary_hue: colors.Color | str = colors.thistle,
41
  neutral_hue: colors.Color | str = colors.slate,
42
  text_size: sizes.Size | str = sizes.text_lg,
43
  font: fonts.Font | str | Iterable[fonts.Font | str] = (
@@ -60,10 +69,10 @@ class ThistleTheme(Soft):
60
  background_fill_primary_dark="*primary_900",
61
  body_background_fill="linear-gradient(135deg, *primary_200, *primary_100)",
62
  body_background_fill_dark="linear-gradient(135deg, *primary_900, *primary_800)",
63
- button_primary_text_color="black",
64
  button_primary_text_color_hover="white",
65
- button_primary_background_fill="linear-gradient(90deg, *secondary_400, *secondary_400)",
66
- button_primary_background_fill_hover="linear-gradient(90deg, *secondary_600, *secondary_600)",
67
  button_primary_background_fill_dark="linear-gradient(90deg, *secondary_600, *secondary_800)",
68
  button_primary_background_fill_hover_dark="linear-gradient(90deg, *secondary_500, *secondary_500)",
69
  button_secondary_text_color="black",
@@ -72,7 +81,7 @@ class ThistleTheme(Soft):
72
  button_secondary_background_fill_hover="linear-gradient(90deg, *primary_400, *primary_400)",
73
  button_secondary_background_fill_dark="linear-gradient(90deg, *primary_500, *primary_600)",
74
  button_secondary_background_fill_hover_dark="linear-gradient(90deg, *primary_500, *primary_500)",
75
- slider_color="*secondary_300",
76
  slider_color_dark="*secondary_600",
77
  block_title_text_weight="600",
78
  block_border_width="3px",
@@ -83,7 +92,7 @@ class ThistleTheme(Soft):
83
  block_label_background_fill="*primary_200",
84
  )
85
 
86
- thistle_theme = ThistleTheme()
87
 
88
  MAX_MAX_NEW_TOKENS = 2048
89
  DEFAULT_MAX_NEW_TOKENS = 1024
@@ -275,7 +284,7 @@ css = """
275
  """
276
 
277
  # Create the Gradio Interface
278
- with gr.Blocks(css=css, theme=thistle_theme) as demo:
279
  gr.Markdown("# **Qwen3-VL-Outpost**", elem_id="main-title")
280
  with gr.Row():
281
  with gr.Column(scale=2):
@@ -287,7 +296,7 @@ with gr.Blocks(css=css, theme=thistle_theme) as demo:
287
  gr.Examples(examples=image_examples, inputs=[image_query, image_upload])
288
 
289
  with gr.TabItem("Video Inference"):
290
- video_query = gr.Textbox(label="Query Input", placeholder="✦︎ Enter your query here...")
291
  video_upload = gr.Video(label="Video", height=290)
292
  video_submit = gr.Button("Submit", variant="primary")
293
  gr.Examples(examples=video_examples, inputs=[video_query, video_upload])
 
25
  from gradio.themes import Soft
26
  from gradio.themes.utils import colors, fonts, sizes
27
 
28
+ colors.steel_blue = colors.Color(
29
+ name="steel_blue",
30
+ c50="#EBF3F8",
31
+ c100="#D3E5F0",
32
+ c200="#A8CCE1",
33
+ c300="#7DB3D2",
34
+ c400="#529AC3",
35
+ c500="#4682B4",
36
+ c600="#3E72A0",
37
+ c700="#36638C",
38
+ c800="#2E5378",
39
+ c900="#264364",
40
+ c950="#1E3450",
41
  )
42
 
43
+
44
+ class SteelBlueTheme(Soft):
45
  def __init__(
46
  self,
47
  *,
48
  primary_hue: colors.Color | str = colors.gray,
49
+ secondary_hue: colors.Color | str = colors.steel_blue,
50
  neutral_hue: colors.Color | str = colors.slate,
51
  text_size: sizes.Size | str = sizes.text_lg,
52
  font: fonts.Font | str | Iterable[fonts.Font | str] = (
 
69
  background_fill_primary_dark="*primary_900",
70
  body_background_fill="linear-gradient(135deg, *primary_200, *primary_100)",
71
  body_background_fill_dark="linear-gradient(135deg, *primary_900, *primary_800)",
72
+ button_primary_text_color="white",
73
  button_primary_text_color_hover="white",
74
+ button_primary_background_fill="linear-gradient(90deg, *secondary_500, *secondary_600)",
75
+ button_primary_background_fill_hover="linear-gradient(90deg, *secondary_600, *secondary_700)",
76
  button_primary_background_fill_dark="linear-gradient(90deg, *secondary_600, *secondary_800)",
77
  button_primary_background_fill_hover_dark="linear-gradient(90deg, *secondary_500, *secondary_500)",
78
  button_secondary_text_color="black",
 
81
  button_secondary_background_fill_hover="linear-gradient(90deg, *primary_400, *primary_400)",
82
  button_secondary_background_fill_dark="linear-gradient(90deg, *primary_500, *primary_600)",
83
  button_secondary_background_fill_hover_dark="linear-gradient(90deg, *primary_500, *primary_500)",
84
+ slider_color="*secondary_500",
85
  slider_color_dark="*secondary_600",
86
  block_title_text_weight="600",
87
  block_border_width="3px",
 
92
  block_label_background_fill="*primary_200",
93
  )
94
 
95
+ steel_blue_theme = SteelBlueTheme()
96
 
97
  MAX_MAX_NEW_TOKENS = 2048
98
  DEFAULT_MAX_NEW_TOKENS = 1024
 
284
  """
285
 
286
  # Create the Gradio Interface
287
+ with gr.Blocks(css=css, theme=steel_blue_theme) as demo:
288
  gr.Markdown("# **Qwen3-VL-Outpost**", elem_id="main-title")
289
  with gr.Row():
290
  with gr.Column(scale=2):
 
296
  gr.Examples(examples=image_examples, inputs=[image_query, image_upload])
297
 
298
  with gr.TabItem("Video Inference"):
299
+ video_query = gr.Textbox(label="Query Input", placeholder="Enter your query here...")
300
  video_upload = gr.Video(label="Video", height=290)
301
  video_submit = gr.Button("Submit", variant="primary")
302
  gr.Examples(examples=video_examples, inputs=[video_query, video_upload])