ISOM5240GP4 commited on
Commit
7817e88
·
verified ·
1 Parent(s): 6f37940

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +26 -22
app.py CHANGED
@@ -96,21 +96,13 @@ Sarah
96
  negative_snippet = "Subject: Issue with Recent Delivery Dear Support, I received my package today, but..."
97
 
98
  # Custom CSS for styling buttons and result boxes with higher specificity
 
99
  st.markdown("""
100
  <style>
101
- /* Style for sample buttons (smaller, light gray), excluding Clear */
102
- div.stButton > button[kind="secondary"]:not([key="clear"]) {
103
- font-size: 12px !important;
104
- padding: 5px 10px !important;
105
- background-color: #f0f0f0 !important;
106
- color: #333333 !important;
107
- border: 1px solid #cccccc !important;
108
- border-radius: 3px !important;
109
- }
110
- /* Analyze Email button (force orange, matches Clear button size) */
111
- div.stButton > button[key="analyze"] {
112
- background-color: #FF5733 !important; /* Force orange color */
113
- color: white !important; /* Force white text */
114
  font-size: 18px !important;
115
  padding: 12px 24px !important;
116
  border: none !important;
@@ -119,15 +111,16 @@ Sarah
119
  height: 50px !important;
120
  box-sizing: border-box !important;
121
  text-align: center !important;
122
- margin: 0 !important; /* Remove any default margins */
123
  }
124
- div.stButton > button[key="analyze"]:hover {
125
  background-color: #E74C3C !important; /* Darker orange on hover */
126
  }
127
- /* Clear button (blue, aligned with Analyze) */
128
- div.stButton > button[key="clear"] {
129
- background-color: #007BFF !important; /* Force blue color */
130
- color: white !important; /* Force white text */
 
131
  font-size: 18px !important;
132
  padding: 12px 24px !important;
133
  border: none !important;
@@ -136,12 +129,23 @@ Sarah
136
  height: 50px !important;
137
  box-sizing: border-box !important;
138
  text-align: center !important;
139
- margin: 0 !important; /* Remove any default margins */
140
  }
141
- div.stButton > button[key="clear"]:hover {
142
  background-color: #0056b3 !important; /* Darker blue on hover */
143
  }
144
- /* Result boxes with updated colors */
 
 
 
 
 
 
 
 
 
 
 
145
  .spam-result {
146
  background-color: #ff3333 !important; /* Red for no follow-up (spam) */
147
  color: white !important;
 
96
  negative_snippet = "Subject: Issue with Recent Delivery Dear Support, I received my package today, but..."
97
 
98
  # Custom CSS for styling buttons and result boxes with higher specificity
99
+ # Replace your existing st.markdown CSS block with this
100
  st.markdown("""
101
  <style>
102
+ /* Ensure high specificity for Analyze Email button (orange) */
103
+ div[data-testid="stButton"] > button[key="analyze"] {
104
+ background-color: #FF5733 !important; /* Orange */
105
+ color: white !important;
 
 
 
 
 
 
 
 
 
106
  font-size: 18px !important;
107
  padding: 12px 24px !important;
108
  border: none !important;
 
111
  height: 50px !important;
112
  box-sizing: border-box !important;
113
  text-align: center !important;
114
+ margin: 0 !important;
115
  }
116
+ div[data-testid="stButton"] > button[key="analyze"]:hover {
117
  background-color: #E74C3C !important; /* Darker orange on hover */
118
  }
119
+
120
+ /* Ensure high specificity for Clear button (blue) */
121
+ div[data-testid="stButton"] > button[key="clear"] {
122
+ background-color: #007BFF !important; /* Blue */
123
+ color: white !important;
124
  font-size: 18px !important;
125
  padding: 12px 24px !important;
126
  border: none !important;
 
129
  height: 50px !important;
130
  box-sizing: border-box !important;
131
  text-align: center !important;
132
+ margin: 0 !important;
133
  }
134
+ div[data-testid="stButton"] > button[key="clear"]:hover {
135
  background-color: #0056b3 !important; /* Darker blue on hover */
136
  }
137
+
138
+ /* Style for sample buttons (light gray) */
139
+ div[data-testid="stButton"] > button[kind="secondary"]:not([key="clear"]):not([key="analyze"]) {
140
+ font-size: 12px !important;
141
+ padding: 5px 10px !important;
142
+ background-color: #f0f0f0 !important;
143
+ color: #333333 !important;
144
+ border: 1px solid #cccccc !important;
145
+ border-radius: 3px !important;
146
+ }
147
+
148
+ /* Result boxes (unchanged) */
149
  .spam-result {
150
  background-color: #ff3333 !important; /* Red for no follow-up (spam) */
151
  color: white !important;