ISOM5240GP4 commited on
Commit
545dce5
·
verified ·
1 Parent(s): 1138fa8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +44 -42
app.py CHANGED
@@ -95,30 +95,31 @@ Sarah
95
  """
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
99
  st.markdown("""
100
  <style>
101
- /* Style for sample buttons (smaller, light gray) */
102
  div.stButton > button[kind="secondary"]:not([key="clear"]) {
103
- font-size: 12px;
104
- padding: 5px 10px;
105
- background-color: #f0f0f0;
106
- color: #333333;
107
- border: 1px solid #cccccc;
108
- border-radius: 3px;
109
  }
110
- /* Analyze Email button (orange, matches Clear button size) */
111
  div.stButton > button[key="analyze"] {
112
  background-color: #FF5733 !important; /* Force orange color */
113
- color: white !important;
114
- font-size: 18px;
115
- padding: 12px 24px;
116
- border: none;
117
- border-radius: 5px;
118
- width: 100%;
119
- height: 50px;
120
- box-sizing: border-box;
121
- text-align: center;
 
122
  }
123
  div.stButton > button[key="analyze"]:hover {
124
  background-color: #E74C3C !important; /* Darker orange on hover */
@@ -126,40 +127,41 @@ Sarah
126
  /* Clear button (gray, aligned with Analyze) */
127
  div.stButton > button[key="clear"] {
128
  background-color: #d3d3d3 !important; /* Force gray color */
129
- color: #333333 !important;
130
- font-size: 18px;
131
- padding: 12px 24px;
132
- border: none;
133
- border-radius: 5px;
134
- width: 100%;
135
- height: 50px;
136
- box-sizing: border-box;
137
- text-align: center;
 
138
  }
139
  div.stButton > button[key="clear"]:hover {
140
  background-color: #b0b0b0 !important; /* Darker gray on hover */
141
  }
142
  /* Result boxes with updated colors */
143
  .spam-result {
144
- background-color: #ff3333; /* Red for no follow-up (spam) */
145
- color: white;
146
- padding: 10px;
147
- border-radius: 5px;
148
- border: 1px solid #cc0000;
149
  }
150
  .positive-result {
151
- background-color: #ff3333; /* Red for no follow-up (positive) */
152
- color: white;
153
- padding: 10px;
154
- border-radius: 5px;
155
- border: 1px solid #cc0000;
156
  }
157
  .negative-result {
158
- background-color: #006633; /* Dark green for follow-up needed */
159
- color: white;
160
- padding: 10px;
161
- border-radius: 5px;
162
- border: 1px solid #004d26;
163
  }
164
  </style>
165
  """, unsafe_allow_html=True)
 
95
  """
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;
117
+ border-radius: 5px !important;
118
+ width: 100% !important;
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 */
 
127
  /* Clear button (gray, aligned with Analyze) */
128
  div.stButton > button[key="clear"] {
129
  background-color: #d3d3d3 !important; /* Force gray color */
130
+ color: #333333 !important; /* Force dark text */
131
+ font-size: 18px !important;
132
+ padding: 12px 24px !important;
133
+ border: none !important;
134
+ border-radius: 5px !important;
135
+ width: 100% !important;
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: #b0b0b0 !important; /* Darker gray 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;
148
+ padding: 10px !important;
149
+ border-radius: 5px !important;
150
+ border: 1px solid #cc0000 !important;
151
  }
152
  .positive-result {
153
+ background-color: #ff3333 !important; /* Red for no follow-up (positive) */
154
+ color: white !important;
155
+ padding: 10px !important;
156
+ border-radius: 5px !important;
157
+ border: 1px solid #cc0000 !important;
158
  }
159
  .negative-result {
160
+ background-color: #006633 !important; /* Dark green for follow-up needed */
161
+ color: white !important;
162
+ padding: 10px !important;
163
+ border-radius: 5px !important;
164
+ border: 1px solid #004d26 !important;
165
  }
166
  </style>
167
  """, unsafe_allow_html=True)