jschwab21 commited on
Commit
79da273
·
verified ·
1 Parent(s): 0d88658

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -24
app.py CHANGED
@@ -1,19 +1,19 @@
1
- from typing import Iterable
2
  import gradio as gr
3
  from video_processing import process_video
4
  from gradio.themes.base import Base
5
  from gradio.themes.utils import colors, fonts, sizes
 
6
 
7
- class CustomTheme(Base):
8
  def __init__(
9
  self,
10
  *,
11
- primary_hue: colors.Color | str = colors.emerald,
12
- secondary_hue: colors.Color | str = colors.blue,
13
- neutral_hue: colors.Color | str = colors.blue,
14
  spacing_size: sizes.Size | str = sizes.spacing_md,
15
  radius_size: sizes.Size | str = sizes.radius_md,
16
- text_size: sizes.Size | str = sizes.text_lg,
17
  font: fonts.Font | str | Iterable[fonts.Font | str] = (
18
  fonts.GoogleFont("Quicksand"),
19
  "ui-sans-serif",
@@ -36,28 +36,21 @@ class CustomTheme(Base):
36
  font_mono=font_mono,
37
  )
38
  super().set(
39
- body_background_fill="#eb5726",
40
  body_text_color="#ffffff",
41
  block_background_fill="#ffffff",
42
  block_title_text_color="#282828",
43
- input_background_fill="#ecf0f1",
44
- input_text_color="#eb5726",
45
- block_label_text_color="#eb5726",
46
- input_label_text_color="#ffffff",
47
- button_primary_background_fill="linear-gradient(90deg, *primary_300, *secondary_400)",
48
- button_primary_background_fill_hover="linear-gradient(90deg, *primary_200, *secondary_300)",
49
- button_primary_text_color="white",
50
- button_primary_background_fill_dark="linear-gradient(90deg, *primary_600, *secondary_800)",
51
- slider_color="*secondary_300",
52
- slider_color_dark="*secondary_600",
53
- block_title_text_weight="600",
54
- block_border_width="3px",
55
- block_shadow="*shadow_drop_lg",
56
- button_shadow="*shadow_drop_lg",
57
- button_large_padding="32px",
58
  )
59
 
60
- custom_theme = CustomTheme()
61
 
62
  def display_results(video_url, description):
63
  final_clip_path = process_video(video_url, description)
@@ -65,7 +58,7 @@ def display_results(video_url, description):
65
  return final_clip_path, final_clip_path
66
  return "No matching scene found", None
67
 
68
- with gr.Blocks(theme=custom_theme) as demo:
69
  with gr.Column():
70
  gr.Markdown("# Sickstadium AI", elem_classes="centered-markdown")
71
  gr.Markdown("### This is a brief description for the webpage.", elem_classes="centered-markdown")
 
 
1
  import gradio as gr
2
  from video_processing import process_video
3
  from gradio.themes.base import Base
4
  from gradio.themes.utils import colors, fonts, sizes
5
+ from typing import Iterable
6
 
7
+ class SimpleTheme(Base):
8
  def __init__(
9
  self,
10
  *,
11
+ primary_hue: colors.Color | str = colors.orange,
12
+ secondary_hue: colors.Color | str = colors.orange,
13
+ neutral_hue: colors.Color | str = colors.gray,
14
  spacing_size: sizes.Size | str = sizes.spacing_md,
15
  radius_size: sizes.Size | str = sizes.radius_md,
16
+ text_size: sizes.Size | str = sizes.text_md,
17
  font: fonts.Font | str | Iterable[fonts.Font | str] = (
18
  fonts.GoogleFont("Quicksand"),
19
  "ui-sans-serif",
 
36
  font_mono=font_mono,
37
  )
38
  super().set(
39
+ body_background_fill="#282828",
40
  body_text_color="#ffffff",
41
  block_background_fill="#ffffff",
42
  block_title_text_color="#282828",
43
+ input_background_fill="#ffffff",
44
+ input_text_color="#282828",
45
+ input_border_color="#eb5726",
46
+ input_label_text_color="#eb5726",
47
+ button_primary_background_fill="#eb5726",
48
+ button_primary_background_fill_hover="#ffffff",
49
+ button_primary_text_color="#ffffff",
50
+ button_primary_text_color_hover="#eb5726",
 
 
 
 
 
 
 
51
  )
52
 
53
+ simple_theme = SimpleTheme()
54
 
55
  def display_results(video_url, description):
56
  final_clip_path = process_video(video_url, description)
 
58
  return final_clip_path, final_clip_path
59
  return "No matching scene found", None
60
 
61
+ with gr.Blocks(theme=simple_theme) as demo:
62
  with gr.Column():
63
  gr.Markdown("# Sickstadium AI", elem_classes="centered-markdown")
64
  gr.Markdown("### This is a brief description for the webpage.", elem_classes="centered-markdown")