1mpreccable commited on
Commit
1b16646
·
verified ·
1 Parent(s): 7626302

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +38 -18
app.py CHANGED
@@ -19,34 +19,50 @@ def main(page):
19
 
20
  def interface():
21
  css_version = int(time.time()) # Use current timestamp as version
22
- with gr.Blocks(css=f"static/styles.css?v={css_version}") as demo:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  # ASCII Logo at the top with inline gradient style
24
  ascii_logo = """
25
  ___ ___ ___
26
- /\ \ /\__\ /\ \
27
- ___ /::\ \ /:/ _/_ /::\ \ ___
28
- /| | /:/\:\ \ /:/ /\ \ /:/\:\ \ /\__\
29
- |:| | /:/ \:\ \ /:/ /::\ \ /:/ /::\ \ /:/__/
30
- |:| | /:/__/ \:\__\ /:/__\/\:\__\ /:/_/:/\:\__\ /::\ \
31
- __|:|__| \:\ \ /:/ / \:\ \ /:/ / \:\/:/ \/__/ \/\:\ \__
32
- /::::\ \ \:\ /:/ / \:\ /:/ / \::/__/ ~~\:\/\__\\
33
- ~~~~\:\ \ \:\/:/ / \:\/:/ / \:\ \ \::/ /
34
- \:\__\ \::/ / \::/ / \:\__\ /:/ /
35
- \/__/ \/__/ \/__/ \/__/ \/__/
36
  """
37
  gr.HTML(
38
  f"""
39
  <div class="ascii-logo-container" style="display: flex; justify-content: center; width: 100%;">
40
  <pre class="ascii-logo" style="
41
  font-family: monospace;
42
- font-size: 2.1em;
43
  line-height: 1.2;
44
  white-space: pre;
45
  text-align: center;
46
- background: linear-gradient(to right, #7dc4e4, #c6a0f6);
47
  -webkit-background-clip: text;
48
  -webkit-text-fill-color: transparent;
49
  display: inline-block;
 
50
  ">{ascii_logo}</pre>
51
  </div>
52
  """
@@ -56,13 +72,17 @@ def interface():
56
  with gr.Row():
57
  with gr.Column(scale=1, elem_classes=["menu-column"]):
58
  # Vertical Navigation Buttons
59
- home_button = gr.Button("Home", elem_classes=["menu-button"])
60
- about_button = gr.Button("About us", elem_classes=["menu-button"])
 
 
 
 
61
  yoga_stream_button = gr.Button(
62
- "Yoga from stream", elem_classes=["menu-button"]
63
  )
64
  yoga_video_button = gr.Button(
65
- "Yoga from video", elem_classes=["menu-button"]
66
  )
67
 
68
  # Create page contents
@@ -131,4 +151,4 @@ def interface():
131
 
132
 
133
  if __name__ == "__main__":
134
- interface().launch()
 
19
 
20
  def interface():
21
  css_version = int(time.time()) # Use current timestamp as version
22
+
23
+ theme = gr.themes.Soft(
24
+ primary_hue="indigo",
25
+ secondary_hue="blue",
26
+ font=[gr.themes.GoogleFont("Roboto"), "sans-serif"],
27
+ ).set(
28
+ body_text_color="#303030",
29
+ block_title_text_size="24px",
30
+ block_label_text_size="20px",
31
+ input_text_size="18px",
32
+ button_large_text_size="20px",
33
+ button_small_text_size="18px",
34
+ checkbox_label_text_size="18px",
35
+ )
36
+
37
+ with gr.Blocks(theme=theme, css=f"static/styles.css?v={css_version}") as demo:
38
  # ASCII Logo at the top with inline gradient style
39
  ascii_logo = """
40
  ___ ___ ___
41
+ /\ \ /\__\ /\ \
42
+ ___ /::\ \ /:/ _/_ /::\ \ ___
43
+ /| | /:/\:\ \ /:/ /\ \ /:/\:\ \ /\__\
44
+ |:| | /:/ \:\ \ /:/ /::\ \ /:/ /::\ \ /:/__/
45
+ |:| | /:/__/ \:\__\ /:/__\/\:\__\ /:/_/:/\:\__\ /::\ \
46
+ __|:|__| \:\ \ /:/ / \:\ \ /:/ / \:\/:/ \/__/ \/\:\ \__
47
+ /::::\ \ \:\ /:/ / \:\ /:/ / \::/__/ ~~\:\/\__\\
48
+ ~~~~\:\ \ \:\/:/ / \:\/:/ / \:\ \ \::/ /
49
+ \:\__\ \::/ / \::/ / \:\__\ /:/ /
50
+ \/__/ \/__/ \/__/ \/__/ \/__/
51
  """
52
  gr.HTML(
53
  f"""
54
  <div class="ascii-logo-container" style="display: flex; justify-content: center; width: 100%;">
55
  <pre class="ascii-logo" style="
56
  font-family: monospace;
57
+ font-size: 1.8em;
58
  line-height: 1.2;
59
  white-space: pre;
60
  text-align: center;
61
+ background: linear-gradient(to right, #4f46e5, #3b82f6);
62
  -webkit-background-clip: text;
63
  -webkit-text-fill-color: transparent;
64
  display: inline-block;
65
+ margin-bottom: 20px;
66
  ">{ascii_logo}</pre>
67
  </div>
68
  """
 
72
  with gr.Row():
73
  with gr.Column(scale=1, elem_classes=["menu-column"]):
74
  # Vertical Navigation Buttons
75
+ home_button = gr.Button(
76
+ "Home", elem_classes=["menu-button", "large-font"]
77
+ )
78
+ about_button = gr.Button(
79
+ "About us", elem_classes=["menu-button", "large-font"]
80
+ )
81
  yoga_stream_button = gr.Button(
82
+ "Yoga from stream", elem_classes=["menu-button", "large-font"]
83
  )
84
  yoga_video_button = gr.Button(
85
+ "Yoga from video", elem_classes=["menu-button", "large-font"]
86
  )
87
 
88
  # Create page contents
 
151
 
152
 
153
  if __name__ == "__main__":
154
+ interface().launch(share=True)