phildunphy14 commited on
Commit
0781071
·
verified ·
1 Parent(s): 340915e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +77 -8
app.py CHANGED
@@ -12,17 +12,65 @@ from bs4 import BeautifulSoup
12
 
13
  st.set_page_config(page_title="Affirmations", page_icon=":muscle:", layout="wide")
14
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  st.markdown(
16
  """
17
  <style>
 
 
 
18
  .stApp {
19
- background-color: #e9e5d9;
20
  }
21
  .title {
22
  font-size: 36px;
23
  font-weight: bold;
24
  text-align: center;
25
  margin-bottom: 20px;
 
26
  }
27
  .image-container {
28
  display: flex;
@@ -30,35 +78,56 @@ st.markdown(
30
  margin-bottom: 20px;
31
  }
32
  .affirmation-box {
33
- background-color: #ffffff;
34
  padding: 20px;
35
  border-radius: 10px;
36
  margin-top: 20px;
37
  text-align: center;
38
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
39
  }
40
  .affirmation-text {
41
  font-family: 'Helvetica', sans-serif;
42
  font-size: 18px;
43
- color: #333333;
44
  }
45
  .stButton button {
46
- background-color: #ff0000;
47
- color: #ffffff;
48
  font-size: 16px;
49
  padding: 10px 20px;
50
  border-radius: 5px;
51
  margin-top: 20px;
52
  width: 100%;
53
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
  </style>
55
  """,
56
  unsafe_allow_html=True
57
  )
58
 
 
59
  col1, col2 = st.columns(2)
60
 
61
- st.title("Taylor Swift's Gym Affirmations")
62
 
63
  with col2:
64
  st.image("https://www.rollingstone.com/wp-content/uploads/2023/05/GettyImages-1482443875.jpeg?w=1581&h=1054&crop=1")
@@ -66,7 +135,7 @@ with col2:
66
  with col1:
67
  st.image("taylor_1.jpg")
68
 
69
- context = st.text_input("Tell taylor about your day for context")
70
 
71
  groq_api_key = os.getenv('groq_api_token')
72
 
 
12
 
13
  st.set_page_config(page_title="Affirmations", page_icon=":muscle:", layout="wide")
14
 
15
+ # st.markdown(
16
+ # """
17
+ # <style>
18
+ # .stApp {
19
+ # background-color: #e9e5d9;
20
+ # }
21
+ # .title {
22
+ # font-size: 36px;
23
+ # font-weight: bold;
24
+ # text-align: center;
25
+ # margin-bottom: 20px;
26
+ # }
27
+ # .image-container {
28
+ # display: flex;
29
+ # justify-content: center;
30
+ # margin-bottom: 20px;
31
+ # }
32
+ # .affirmation-box {
33
+ # background-color: #ffffff;
34
+ # padding: 20px;
35
+ # border-radius: 10px;
36
+ # margin-top: 20px;
37
+ # text-align: center;
38
+ # box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
39
+ # }
40
+ # .affirmation-text {
41
+ # font-family: 'Helvetica', sans-serif;
42
+ # font-size: 18px;
43
+ # color: #333333;
44
+ # }
45
+ # .stButton button {
46
+ # background-color: #ff0000;
47
+ # color: #ffffff;
48
+ # font-size: 16px;
49
+ # padding: 10px 20px;
50
+ # border-radius: 5px;
51
+ # margin-top: 20px;
52
+ # width: 100%;
53
+ # }
54
+ # </style>
55
+ # """,
56
+ # unsafe_allow_html=True
57
+ # )
58
+
59
  st.markdown(
60
  """
61
  <style>
62
+ :root {
63
+ color-scheme: light dark;
64
+ }
65
  .stApp {
66
+ background-color: var(--background);
67
  }
68
  .title {
69
  font-size: 36px;
70
  font-weight: bold;
71
  text-align: center;
72
  margin-bottom: 20px;
73
+ color: var(--text);
74
  }
75
  .image-container {
76
  display: flex;
 
78
  margin-bottom: 20px;
79
  }
80
  .affirmation-box {
81
+ background-color: var(--box-background);
82
  padding: 20px;
83
  border-radius: 10px;
84
  margin-top: 20px;
85
  text-align: center;
86
+ box-shadow: var(--box-shadow);
87
  }
88
  .affirmation-text {
89
  font-family: 'Helvetica', sans-serif;
90
  font-size: 18px;
91
+ color: var(--text);
92
  }
93
  .stButton button {
94
+ background-color: var(--button-background);
95
+ color: var(--button-text);
96
  font-size: 16px;
97
  padding: 10px 20px;
98
  border-radius: 5px;
99
  margin-top: 20px;
100
  width: 100%;
101
  }
102
+ @media (prefers-color-scheme: dark) {
103
+ :root {
104
+ --background: #333333;
105
+ --text: #ffffff;
106
+ --box-background: #424242;
107
+ --box-shadow: 0 2px 4px rgba(255, 255, 255, 0.1);
108
+ --button-background: #0084ff;
109
+ --button-text: #ffffff;
110
+ }
111
+ }
112
+ @media (prefers-color-scheme: light) {
113
+ :root {
114
+ --background: #e9e5d9;
115
+ --text: #333333;
116
+ --box-background: #ffffff;
117
+ --box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
118
+ --button-background: #ff0000;
119
+ --button-text: #ffffff;
120
+ }
121
+ }
122
  </style>
123
  """,
124
  unsafe_allow_html=True
125
  )
126
 
127
+
128
  col1, col2 = st.columns(2)
129
 
130
+ st.title("Taylor Swift's Affirmations")
131
 
132
  with col2:
133
  st.image("https://www.rollingstone.com/wp-content/uploads/2023/05/GettyImages-1482443875.jpeg?w=1581&h=1054&crop=1")
 
135
  with col1:
136
  st.image("taylor_1.jpg")
137
 
138
+ context = st.text_input("Tell taylor about your day for her context")
139
 
140
  groq_api_key = os.getenv('groq_api_token')
141