baconnier commited on
Commit
3b40407
·
verified ·
1 Parent(s): 7ed871b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +54 -78
app.py CHANGED
@@ -160,7 +160,7 @@ class GradioInterface:
160
  background: white;
161
  position: relative;
162
  width: 100% !important;
163
- # max-width: 800px !important;
164
  margin: 0 auto 20px auto !important;
165
  }
166
 
@@ -175,25 +175,10 @@ class GradioInterface:
175
  font-size: 1.2em;
176
  }
177
 
178
- .container::after {
179
- content: '' !important;
180
- position: absolute !important;
181
- top: 0 !important;
182
- left: 0 !important;
183
- right: 0 !important;
184
- bottom: 0 !important;
185
- background-image: url('your-image-url.jpg') !important;
186
- background-size: cover !important;
187
- background-position: center !important;
188
- opacity: 0.05 !important;
189
- z-index: -1 !important;
190
- border-radius: 10px !important;
191
- }
192
-
193
  .title-container {
194
  width: fit-content !important;
195
  margin: 0 auto !important;
196
- padding: 2px 10px !important;
197
  border: 1px solid #0066cc !important;
198
  border-radius: 10px !important;
199
  background-color: rgba(0, 102, 204, 0.05) !important;
@@ -236,30 +221,43 @@ class GradioInterface:
236
  content: 'EXAMPLES';
237
  }
238
 
239
- .container2 {
240
- border: 1px solid #CBDCEB !important;
241
- border-radius: 8px !important;
242
- padding: 8px !important;
243
- margin: 6px 0 !important;
244
- background: white !important;
245
- }
246
-
247
  .input-container textarea {
248
- height: 200px !important;
 
 
 
 
 
 
 
249
  }
250
 
251
- .no-background {
252
- background: transparent !important;
 
253
  }
254
 
255
- /* Update radio container background color */
256
- .input-container .gradio-radio {
257
  background-color: rgba(0, 102, 204, 0.05) !important;
258
- border-radius: 8px !important;
259
  padding: 10px !important;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
260
  }
261
 
262
- /* Style for radio button labels */
263
  .gradio-radio label {
264
  display: flex !important;
265
  align-items: center !important;
@@ -268,9 +266,9 @@ class GradioInterface:
268
  border-radius: 4px !important;
269
  cursor: pointer !important;
270
  background: white !important;
 
271
  }
272
 
273
- /* Style for selected radio button */
274
  .gradio-radio input[type="radio"]:checked + label {
275
  background: rgba(0, 102, 204, 0.1) !important;
276
  border-color: #0066cc !important;
@@ -278,29 +276,22 @@ class GradioInterface:
278
  font-weight: bold !important;
279
  }
280
 
281
- /* Radio group container */
282
- .radio-group {
283
- background-color: rgb(203, 220, 235) !important;
284
- padding: 10px !important;
285
- border-radius: 8px !important;
286
- border: 1px solid #0066cc !important;
287
- }
288
-
289
- /* Textbox styling */
290
- .gradio-textbox textarea {
291
- border: 1px solid #ddd !important;
292
- border-radius: 4px !important;
293
- padding: 8px !important;
294
- min-height: 100px !important;
295
- }
296
-
297
  /* Button styling */
298
  .gradio-button {
299
- background-color: #2196F3 !important;
300
- color: white !important;
 
301
  border-radius: 4px !important;
302
  padding: 8px 16px !important;
303
  margin: 10px 0 !important;
 
 
 
 
 
 
 
 
304
  }
305
 
306
  /* Accordion styling */
@@ -309,43 +300,28 @@ class GradioInterface:
309
  border: none !important;
310
  }
311
 
312
- /* Fix container alignment */
313
  .gradio-container {
314
  display: flex !important;
315
  flex-direction: column !important;
316
  align-items: center !important;
317
  width: 100% !important;
318
- #max-width: 800px !important;
319
  margin: 0 auto !important;
320
  }
321
- /* Button styling - updated */
322
- .gradio-button {
323
- background-color: white !important;
324
- color: #2196F3 !important;
325
- border: 2px solid #2196F3 !important;
326
- border-radius: 4px !important;
327
- padding: 8px 16px !important;
328
- margin: 10px 0 !important;
329
- font-weight: bold !important;
330
- transition: all 0.3s ease !important;
331
- }
332
-
333
- .gradio-button:hover {
334
- background-color: #2196F3 !important;
335
- color: white !important;
336
- box-shadow: 0 2px 5px rgba(33, 150, 243, 0.3) !important;
337
- }
338
 
339
- /* Specific button styling if needed */
340
- #refine-button, #apply-button {
341
- background-color: white !important;
342
- color: #2196F3 !important;
343
- border: 2px solid #2196F3 !important;
344
  }
345
 
346
- #refine-button:hover, #apply-button:hover {
347
- background-color: #2196F3 !important;
348
- color: white !important;
 
 
 
349
  }
350
  """
351
 
 
160
  background: white;
161
  position: relative;
162
  width: 100% !important;
163
+ max-width: 800px !important;
164
  margin: 0 auto 20px auto !important;
165
  }
166
 
 
175
  font-size: 1.2em;
176
  }
177
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
178
  .title-container {
179
  width: fit-content !important;
180
  margin: 0 auto !important;
181
+ padding: 2px 40px !important;
182
  border: 1px solid #0066cc !important;
183
  border-radius: 10px !important;
184
  background-color: rgba(0, 102, 204, 0.05) !important;
 
221
  content: 'EXAMPLES';
222
  }
223
 
224
+ /* Resizable textbox */
 
 
 
 
 
 
 
225
  .input-container textarea {
226
+ resize: vertical !important;
227
+ min-height: 100px !important;
228
+ max-height: 500px !important;
229
+ width: 100% !important;
230
+ border: 1px solid #ddd !important;
231
+ border-radius: 4px !important;
232
+ padding: 8px !important;
233
+ transition: all 0.3s ease !important;
234
  }
235
 
236
+ .input-container textarea:focus {
237
+ border-color: #2196F3 !important;
238
+ box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1) !important;
239
  }
240
 
241
+ /* Radio group styling */
242
+ .radio-group {
243
  background-color: rgba(0, 102, 204, 0.05) !important;
 
244
  padding: 10px !important;
245
+ border-radius: 8px !important;
246
+ border: 1px solid rgba(0, 102, 204, 0.1) !important;
247
+ display: flex !important;
248
+ justify-content: center !important;
249
+ flex-wrap: wrap !important;
250
+ gap: 8px !important;
251
+ width: 100% !important;
252
+ }
253
+
254
+ .gradio-radio {
255
+ display: flex !important;
256
+ justify-content: center !important;
257
+ flex-wrap: wrap !important;
258
+ gap: 8px !important;
259
  }
260
 
 
261
  .gradio-radio label {
262
  display: flex !important;
263
  align-items: center !important;
 
266
  border-radius: 4px !important;
267
  cursor: pointer !important;
268
  background: white !important;
269
+ margin: 4px !important;
270
  }
271
 
 
272
  .gradio-radio input[type="radio"]:checked + label {
273
  background: rgba(0, 102, 204, 0.1) !important;
274
  border-color: #0066cc !important;
 
276
  font-weight: bold !important;
277
  }
278
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
279
  /* Button styling */
280
  .gradio-button {
281
+ background-color: white !important;
282
+ color: #2196F3 !important;
283
+ border: 2px solid #2196F3 !important;
284
  border-radius: 4px !important;
285
  padding: 8px 16px !important;
286
  margin: 10px 0 !important;
287
+ font-weight: bold !important;
288
+ transition: all 0.3s ease !important;
289
+ }
290
+
291
+ .gradio-button:hover {
292
+ background-color: #2196F3 !important;
293
+ color: white !important;
294
+ box-shadow: 0 2px 5px rgba(33, 150, 243, 0.3) !important;
295
  }
296
 
297
  /* Accordion styling */
 
300
  border: none !important;
301
  }
302
 
303
+ /* Container alignment */
304
  .gradio-container {
305
  display: flex !important;
306
  flex-direction: column !important;
307
  align-items: center !important;
308
  width: 100% !important;
309
+ max-width: 800px !important;
310
  margin: 0 auto !important;
311
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
312
 
313
+ /* Dropdown styling */
314
+ .gradio-dropdown {
315
+ width: 100% !important;
316
+ max-width: 300px !important;
 
317
  }
318
 
319
+ /* JSON container */
320
+ .full-response-json {
321
+ margin-top: 20px !important;
322
+ padding: 10px !important;
323
+ background-color: rgba(0, 102, 204, 0.05) !important;
324
+ border-radius: 8px !important;
325
  }
326
  """
327