jschwab21 commited on
Commit
3af1c8c
·
verified ·
1 Parent(s): 65a00d2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +24 -5
app.py CHANGED
@@ -4,7 +4,7 @@ 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
  *,
@@ -36,8 +36,8 @@ class SimpleTheme(Base):
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
  block_label_text_color="#eb5726",
@@ -47,7 +47,7 @@ class SimpleTheme(Base):
47
  button_primary_text_color_hover="#eb5726",
48
  )
49
 
50
- simple_theme = SimpleTheme()
51
 
52
  def display_results(video_url, description):
53
  final_clip_path = process_video(video_url, description)
@@ -55,7 +55,26 @@ def display_results(video_url, description):
55
  return final_clip_path, final_clip_path
56
  return "No matching scene found", None
57
 
58
- with gr.Blocks(theme=simple_theme) as demo:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
  with gr.Column():
60
  gr.Markdown("# Sickstadium AI", elem_classes="centered-markdown")
61
  gr.Markdown("### This is a brief description for the webpage.", elem_classes="centered-markdown")
 
4
  from gradio.themes.utils import colors, fonts, sizes
5
  from typing import Iterable
6
 
7
+ class CustomTheme(Base):
8
  def __init__(
9
  self,
10
  *,
 
36
  font_mono=font_mono,
37
  )
38
  super().set(
39
+ body_background_fill="#ffffff",
40
+ body_text_color="#282828",
41
  block_background_fill="#ffffff",
42
  block_title_text_color="#282828",
43
  block_label_text_color="#eb5726",
 
47
  button_primary_text_color_hover="#eb5726",
48
  )
49
 
50
+ custom_theme = CustomTheme()
51
 
52
  def display_results(video_url, description):
53
  final_clip_path = process_video(video_url, description)
 
55
  return final_clip_path, final_clip_path
56
  return "No matching scene found", None
57
 
58
+ # Custom CSS for additional styling
59
+ css = """
60
+ #video_url {
61
+ background-color: #eb5726;
62
+ color: #ffffff;
63
+ border: 2px solid #eb5726;
64
+ }
65
+ #description {
66
+ background-color: #ffffff;
67
+ color: #282828;
68
+ border: 2px solid #eb5726;
69
+ }
70
+ #submit_button {
71
+ background-color: #eb5726;
72
+ color: #ffffff;
73
+ border: 2px solid #ffffff;
74
+ }
75
+ """
76
+
77
+ with gr.Blocks(theme=custom_theme, css=css) as demo:
78
  with gr.Column():
79
  gr.Markdown("# Sickstadium AI", elem_classes="centered-markdown")
80
  gr.Markdown("### This is a brief description for the webpage.", elem_classes="centered-markdown")