prithivMLmods commited on
Commit
e227239
·
verified ·
1 Parent(s): 44f8775

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -17
app.py CHANGED
@@ -27,16 +27,16 @@ from painting_126 import painting_classification
27
  from sketch_126 import sketch_classification # New import
28
 
29
  #Gradio-Theme
30
- class Minimalist(Base):
31
  def __init__(
32
  self,
33
  *,
34
- primary_hue: colors.Color | str = colors.gray,
35
- secondary_hue: colors.Color | str = colors.slate,
36
- neutral_hue: colors.Color | str = colors.gray,
37
  spacing_size: sizes.Size | str = sizes.spacing_md,
38
- radius_size: sizes.Size | str = sizes.radius_sm,
39
- text_size: sizes.Size | str = sizes.text_md,
40
  font: fonts.Font
41
  | str
42
  | Iterable[fonts.Font | str] = (
@@ -63,22 +63,22 @@ class Minimalist(Base):
63
  font_mono=font_mono,
64
  )
65
  super().set(
66
- body_background_fill="*neutral_50",
67
- body_background_fill_dark="*neutral_900",
68
- button_primary_background_fill="*primary_500",
69
- button_primary_background_fill_hover="*primary_400",
70
  button_primary_text_color="white",
71
- button_primary_background_fill_dark="*primary_700",
72
  slider_color="*secondary_400",
73
  slider_color_dark="*secondary_500",
74
  block_title_text_weight="500",
75
- block_border_width="1px",
76
- block_shadow="none",
77
- button_primary_shadow="none",
78
- button_large_padding="16px",
79
  )
80
 
81
- minimalist = Minimalist()
82
 
83
  # Main classification function for multi-model classification.
84
  def classify(image, model_name):
@@ -170,7 +170,7 @@ def infer(image, candidate_labels):
170
  return postprocess_siglip(sg1_probs, sg2_probs, labels=candidate_labels)
171
 
172
  # Build the Gradio Interface with two tabs.
173
- with gr.Blocks(theme=minimalist) as demo:
174
  gr.Markdown("# Multi-Domain & Zero-Shot Image Classification")
175
 
176
  with gr.Tabs():
 
27
  from sketch_126 import sketch_classification # New import
28
 
29
  #Gradio-Theme
30
+ class MinimalistModern(Base):
31
  def __init__(
32
  self,
33
  *,
34
+ primary_hue: colors.Color | str = colors.teal,
35
+ secondary_hue: colors.Color | str = colors.cyan,
36
+ neutral_hue: colors.Color | str = colors.indigo,
37
  spacing_size: sizes.Size | str = sizes.spacing_md,
38
+ radius_size: sizes.Size | str = sizes.radius_lg,
39
+ text_size: sizes.Size | str = sizes.text_lg,
40
  font: fonts.Font
41
  | str
42
  | Iterable[fonts.Font | str] = (
 
63
  font_mono=font_mono,
64
  )
65
  super().set(
66
+ body_background_fill="linear-gradient(120deg, *primary_700, *secondary_700)",
67
+ body_background_fill_dark="linear-gradient(120deg, *primary_800, *secondary_900)",
68
+ button_primary_background_fill="linear-gradient(90deg, *primary_400, *secondary_500)",
69
+ button_primary_background_fill_hover="linear-gradient(90deg, *primary_300, *secondary_400)",
70
  button_primary_text_color="white",
71
+ button_primary_background_fill_dark="linear-gradient(90deg, *primary_500, *secondary_700)",
72
  slider_color="*secondary_400",
73
  slider_color_dark="*secondary_500",
74
  block_title_text_weight="500",
75
+ block_border_width="2px",
76
+ block_shadow="*shadow_drop_md",
77
+ button_primary_shadow="*shadow_drop_md",
78
+ button_large_padding="24px",
79
  )
80
 
81
+ minimalist_modern = MinimalistModern()
82
 
83
  # Main classification function for multi-model classification.
84
  def classify(image, model_name):
 
170
  return postprocess_siglip(sg1_probs, sg2_probs, labels=candidate_labels)
171
 
172
  # Build the Gradio Interface with two tabs.
173
+ with gr.Blocks(theme=minimalist_modern) as demo:
174
  gr.Markdown("# Multi-Domain & Zero-Shot Image Classification")
175
 
176
  with gr.Tabs():