neerajkalyank commited on
Commit
97272d5
·
verified ·
1 Parent(s): fde24c1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +64 -67
app.py CHANGED
@@ -124,100 +124,121 @@ with gr.Blocks() as app:
124
  app.css = """
125
  @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');
126
 
 
127
  body {
128
  font-family: 'Poppins', Arial, sans-serif;
129
- background: linear-gradient(to bottom right, #1e3c72, #2a5298);
130
  color: #e0f7fa;
131
  margin: 0;
132
  padding: 0;
 
 
 
 
133
  }
134
 
 
135
  #header {
136
  color: #fbc02d;
137
  text-align: center;
138
  font-weight: 700;
139
- text-transform: uppercase;
140
  font-size: 2.5em;
141
  margin-bottom: 25px;
142
- text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.3);
 
143
  }
144
 
 
145
  .gradio-container {
146
  max-width: 850px;
147
  margin: 30px auto;
148
- padding: 30px;
149
- background: rgba(50, 50, 50, 0.95); /* Dark gray background instead of pure black */
150
- border-radius: 15px;
151
- box-shadow: 0px 10px 40px rgba(0, 0, 0, 0.6);
152
  color: #ffffff;
153
  }
154
 
 
155
  #name_field, #father_name_field, #age_field, #phone_field, #address_field, #pincode_field, textarea {
156
  max-width: 700px;
157
- border: 1px solid #444;
158
  border-radius: 8px;
159
  padding: 12px;
160
- background: rgba(245, 245, 245, 0.85);
161
  color: #2d2d2d;
162
  font-size: 15px;
163
  margin-bottom: 15px;
164
- transition: border 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
 
165
  }
166
 
167
  #name_field:focus, #father_name_field:focus, #age_field:focus, #phone_field:focus, #address_field:focus, #pincode_field:focus, textarea:focus {
168
  border-color: #ffd54f;
169
- box-shadow: 0 0 10px rgba(255, 213, 79, 0.7);
170
  transform: scale(1.02);
171
  }
172
 
 
173
  textarea {
174
  font-size: 15px;
175
- color: #2d2d2d;
176
- background: rgba(245, 245, 245, 0.9);
177
  padding: 15px;
178
  border-radius: 8px;
179
- border: 1px solid #444;
180
- transition: all 0.3s ease;
 
181
  }
182
 
 
183
  .gr-button {
184
  color: #ffffff;
185
- background: linear-gradient(to right, #4a90e2, #007aff);
186
  border: none;
187
- border-radius: 10px;
188
  padding: 12px 30px;
189
  cursor: pointer;
190
  font-weight: 600;
191
  font-size: 16px;
192
- transition: background 0.3s ease, transform 0.2s, box-shadow 0.3s ease;
193
- box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
194
  }
195
 
196
  .gr-button:hover {
197
- background: linear-gradient(to right, #0061a7, #005cbf);
198
- transform: scale(1.07);
199
- box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
200
  }
201
 
202
- .gr-tab {
203
- background: rgba(255, 255, 255, 0.08);
204
- border-radius: 10px;
205
- padding: 20px;
206
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
207
- margin-bottom: 20px;
 
208
  }
209
 
210
- .gr-tab.active {
211
- background: rgba(255, 136, 0, 0.1); /* Add a slight orange tint to active tab */
212
- border-left: 4px solid #ff8c00;
 
 
 
 
213
  }
214
 
215
- h1, h2, h3, h4, h5, h6 {
216
- color: #ffeb3b;
 
 
 
 
 
 
217
  font-weight: 700;
218
- text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
219
  }
220
 
 
221
  #billing_output {
222
  background: rgba(40, 40, 40, 0.9);
223
  padding: 20px;
@@ -228,45 +249,21 @@ h1, h2, h3, h4, h5, h6 {
228
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
229
  }
230
 
231
- .checkbox, .textbox {
232
- margin-bottom: 18px;
233
- color: #f5f5f5;
234
- }
235
-
236
  ::placeholder {
237
  color: #888;
238
- opacity: 1;
239
- }
240
-
241
- /* Tab container styling */
242
- /* Tab container styling */
243
- .nav-tabs {
244
- display: flex;
245
- justify-content: space-around;
246
- background-color: #333; /* Dark gray background for tab container */
247
- border-bottom: 1px solid #fff; /* Thin line under the tab container */
248
- }
249
-
250
- /* Individual tab styling */
251
- .nav-tabs .nav-item {
252
- padding: 12px 20px;
253
- font-weight: 600;
254
- font-size: 1em;
255
- color: #B0BEC5; /* Light gray for inactive tabs */
256
- cursor: pointer;
257
- transition: color 0.3s ease, border-color 0.3s ease;
258
  }
259
 
260
- /* Hover effect on tabs */
261
- .nav-tabs .nav-item:hover {
262
- color: #FFCA28; /* Bright yellow on hover */
 
263
  }
264
 
265
- /* Active tab styling */
266
- .nav-tabs .nav-item.active {
267
- color: #FF8C00; /* Bright orange for the active tab text */
268
- border-bottom: 3px solid #FF8C00; /* Orange underline for active tab */
269
- font-weight: 700; /* Bold font for active tab */
270
  }
271
 
272
  """
 
124
  app.css = """
125
  @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');
126
 
127
+ /* General Page Style */
128
  body {
129
  font-family: 'Poppins', Arial, sans-serif;
130
+ background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
131
  color: #e0f7fa;
132
  margin: 0;
133
  padding: 0;
134
+ display: flex;
135
+ justify-content: center;
136
+ align-items: center;
137
+ min-height: 100vh;
138
  }
139
 
140
+ /* Header */
141
  #header {
142
  color: #fbc02d;
143
  text-align: center;
144
  font-weight: 700;
 
145
  font-size: 2.5em;
146
  margin-bottom: 25px;
147
+ text-shadow: 3px 3px 10px rgba(0, 0, 0, 0.5);
148
+ letter-spacing: 1px;
149
  }
150
 
151
+ /* Container Style */
152
  .gradio-container {
153
  max-width: 850px;
154
  margin: 30px auto;
155
+ padding: 40px;
156
+ background: rgba(50, 50, 50, 0.95);
157
+ border-radius: 20px;
158
+ box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8);
159
  color: #ffffff;
160
  }
161
 
162
+ /* Form Field Styles */
163
  #name_field, #father_name_field, #age_field, #phone_field, #address_field, #pincode_field, textarea {
164
  max-width: 700px;
165
+ border: 1px solid #555;
166
  border-radius: 8px;
167
  padding: 12px;
168
+ background: rgba(255, 255, 255, 0.9);
169
  color: #2d2d2d;
170
  font-size: 15px;
171
  margin-bottom: 15px;
172
+ transition: 0.3s ease-in-out;
173
+ box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
174
  }
175
 
176
  #name_field:focus, #father_name_field:focus, #age_field:focus, #phone_field:focus, #address_field:focus, #pincode_field:focus, textarea:focus {
177
  border-color: #ffd54f;
178
+ box-shadow: 0 0 12px rgba(255, 213, 79, 0.8);
179
  transform: scale(1.02);
180
  }
181
 
182
+ /* Textarea */
183
  textarea {
184
  font-size: 15px;
 
 
185
  padding: 15px;
186
  border-radius: 8px;
187
+ background: rgba(245, 245, 245, 0.9);
188
+ border: 1px solid #555;
189
+ transition: 0.3s ease;
190
  }
191
 
192
+ /* Button Style */
193
  .gr-button {
194
  color: #ffffff;
195
+ background: linear-gradient(135deg, #4a90e2, #007aff);
196
  border: none;
197
+ border-radius: 12px;
198
  padding: 12px 30px;
199
  cursor: pointer;
200
  font-weight: 600;
201
  font-size: 16px;
202
+ transition: 0.3s ease;
203
+ box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
204
  }
205
 
206
  .gr-button:hover {
207
+ background: linear-gradient(135deg, #005cbf, #0061a7);
208
+ transform: scale(1.05);
209
+ box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
210
  }
211
 
212
+ /* Tabs Styling */
213
+ .nav-tabs {
214
+ display: flex;
215
+ justify-content: space-between;
216
+ background-color: #333;
217
+ border-bottom: 1px solid #fff;
218
+ padding: 10px;
219
  }
220
 
221
+ .nav-tabs .nav-item {
222
+ font-size: 1em;
223
+ color: #B0BEC5;
224
+ padding: 10px 20px;
225
+ cursor: pointer;
226
+ transition: color 0.3s, transform 0.3s;
227
+ font-weight: 500;
228
  }
229
 
230
+ .nav-tabs .nav-item:hover {
231
+ color: #FFCA28;
232
+ transform: translateY(-2px);
233
+ }
234
+
235
+ .nav-tabs .nav-item.active {
236
+ color: #FF8C00;
237
+ border-bottom: 3px solid #FF8C00;
238
  font-weight: 700;
 
239
  }
240
 
241
+ /* Billing Output */
242
  #billing_output {
243
  background: rgba(40, 40, 40, 0.9);
244
  padding: 20px;
 
249
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
250
  }
251
 
252
+ /* Text and Placeholder Styling */
 
 
 
 
253
  ::placeholder {
254
  color: #888;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
255
  }
256
 
257
+ h1, h2, h3, h4, h5, h6 {
258
+ color: #ffeb3b;
259
+ font-weight: 700;
260
+ text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
261
  }
262
 
263
+ /* Checkboxes */
264
+ .checkbox, .textbox {
265
+ margin-bottom: 18px;
266
+ color: #f5f5f5;
 
267
  }
268
 
269
  """