prithivMLmods commited on
Commit
c1e2d8a
·
verified ·
1 Parent(s): e52366a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -13
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 MinimalModern(Base):
31
  def __init__(
32
  self,
33
  *,
34
  primary_hue: colors.Color | str = colors.sky,
35
- secondary_hue: colors.Color | str = colors.teal,
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_md,
39
- text_size: sizes.Size | str = sizes.text_lg,
40
  font: fonts.Font | str | Iterable[fonts.Font | str] = (
41
  fonts.GoogleFont("Inter"),
42
  "ui-sans-serif",
@@ -59,13 +59,12 @@ class MinimalModern(Base):
59
  font_mono=font_mono,
60
  )
61
  super().set(
62
- # Use flat colors instead of gradients for a minimal feel
63
- body_background_fill="*primary_100",
64
- body_background_fill_dark="*primary_700",
65
- button_primary_background_fill="*secondary_200",
66
- button_primary_background_fill_hover="*secondary_100",
67
  button_primary_text_color="white",
68
- button_primary_background_fill_dark="*secondary_500",
69
  slider_color="*secondary_200",
70
  slider_color_dark="*secondary_500",
71
  block_title_text_weight="400",
@@ -75,7 +74,8 @@ class MinimalModern(Base):
75
  button_large_padding="24px",
76
  )
77
 
78
- minimal_modern = MinimalModern()
 
79
 
80
  # Main classification function for multi-model classification.
81
  def classify(image, model_name):
@@ -167,7 +167,7 @@ def infer(image, candidate_labels):
167
  return postprocess_siglip(sg1_probs, sg2_probs, labels=candidate_labels)
168
 
169
  # Build the Gradio Interface with two tabs.
170
- with gr.Blocks(theme=minimal_modern ) as demo:
171
  gr.Markdown("# Multi-Domain & Zero-Shot Image Classification")
172
 
173
  with gr.Tabs():
 
27
  from sketch_126 import sketch_classification # New import
28
 
29
  #Gradio-Theme
30
+ class MinimalMinimal(Base):
31
  def __init__(
32
  self,
33
  *,
34
  primary_hue: colors.Color | str = colors.sky,
35
+ secondary_hue: colors.Color | str = colors.lavender,
36
  neutral_hue: colors.Color | str = colors.indigo,
37
+ spacing_size: sizes.Size | str = sizes.spacing_sm,
38
+ radius_size: sizes.Size | str = sizes.radius_sm,
39
+ text_size: sizes.Size | str = sizes.text_md,
40
  font: fonts.Font | str | Iterable[fonts.Font | str] = (
41
  fonts.GoogleFont("Inter"),
42
  "ui-sans-serif",
 
59
  font_mono=font_mono,
60
  )
61
  super().set(
62
+ body_background_fill="linear-gradient(135deg, *primary_100, *secondary_100)",
63
+ body_background_fill_dark="linear-gradient(135deg, *primary_700, *secondary_700)",
64
+ button_primary_background_fill="linear-gradient(90deg, *primary_200, *secondary_200)",
65
+ button_primary_background_fill_hover="linear-gradient(90deg, *primary_100, *secondary_100)",
 
66
  button_primary_text_color="white",
67
+ button_primary_background_fill_dark="linear-gradient(90deg, *primary_500, *secondary_500)",
68
  slider_color="*secondary_200",
69
  slider_color_dark="*secondary_500",
70
  block_title_text_weight="400",
 
74
  button_large_padding="24px",
75
  )
76
 
77
+ minimal_minimal = MinimalMinimal()
78
+
79
 
80
  # Main classification function for multi-model classification.
81
  def classify(image, model_name):
 
167
  return postprocess_siglip(sg1_probs, sg2_probs, labels=candidate_labels)
168
 
169
  # Build the Gradio Interface with two tabs.
170
+ with gr.Blocks(theme=minimal_minimal) as demo:
171
  gr.Markdown("# Multi-Domain & Zero-Shot Image Classification")
172
 
173
  with gr.Tabs():