Ephemeral182 commited on
Commit
949194b
Β·
verified Β·
1 Parent(s): e8542ca

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +50 -23
app.py CHANGED
@@ -209,8 +209,9 @@ def create_interface():
209
 
210
  custom_css = """
211
  .gradio-container {
212
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
213
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
 
214
  }
215
 
216
  .contain {
@@ -218,16 +219,17 @@ def create_interface():
218
  border-radius: 15px;
219
  padding: 25px;
220
  margin: 15px;
221
- box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
 
222
  }
223
 
224
  .title-container {
225
  text-align: center;
226
  margin-bottom: 25px;
227
  padding: 20px;
228
- background: linear-gradient(135deg, #ff6b6b, #ee5a52);
229
  border-radius: 12px;
230
- box-shadow: 0 5px 20px rgba(255, 107, 107, 0.3);
231
  }
232
 
233
  .title-container h1 {
@@ -239,22 +241,22 @@ def create_interface():
239
  }
240
 
241
  .info-bar {
242
- background: linear-gradient(135deg, #4facfe, #00f2fe);
243
  padding: 12px;
244
  border-radius: 8px;
245
  margin-bottom: 20px;
246
  color: white;
247
  text-align: center;
248
  font-weight: 500;
249
- box-shadow: 0 3px 12px rgba(79, 172, 254, 0.3);
250
  }
251
 
252
  .section-header {
253
- background: linear-gradient(135deg, #a8edea, #fed6e3);
254
  padding: 12px;
255
  border-radius: 8px;
256
  margin-bottom: 15px;
257
- border-left: 4px solid #ff6b6b;
258
  }
259
 
260
  .section-header h3 {
@@ -264,51 +266,76 @@ def create_interface():
264
  }
265
 
266
  .input-group {
267
- background: rgba(255, 255, 255, 0.8);
268
  padding: 18px;
269
  border-radius: 12px;
270
  margin-bottom: 15px;
271
- border: 1px solid rgba(0, 0, 0, 0.1);
272
- box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05);
273
  }
274
 
275
  .result-section {
276
  background: rgba(255, 255, 255, 0.9);
277
  padding: 18px;
278
  border-radius: 12px;
279
- border: 1px solid rgba(0, 0, 0, 0.1);
280
- box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05);
281
  }
282
 
283
  .tip-box {
284
- background: linear-gradient(135deg, #ffeaa7, #fdcb6e);
285
  padding: 10px;
286
  border-radius: 6px;
287
  margin: 8px 0;
288
- border-left: 3px solid #f39c12;
289
- color: #8b4513;
290
  font-weight: 500;
291
  }
292
 
293
  button.primary {
294
- background: linear-gradient(135deg, #ff6b6b, #ee5a52) !important;
295
  border: none !important;
296
  border-radius: 20px !important;
297
  padding: 12px 25px !important;
298
  color: white !important;
299
  font-weight: bold !important;
300
  font-size: 15px !important;
301
- box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4) !important;
302
  }
303
 
304
  button.primary:hover {
305
- box-shadow: 0 8px 25px rgba(255, 107, 107, 0.6) !important;
306
  opacity: 0.9 !important;
 
307
  }
308
 
309
- .examples .example-button {
310
- text-align: left !important;
311
- justify-content: flex-start !important;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
312
  }
313
 
314
  .preserve-aspect-ratio img {
@@ -351,7 +378,7 @@ button.primary:hover {
351
 
352
  with gr.Column(scale=1, elem_classes="result-section"):
353
  gr.HTML('<div class="section-header"><h3>🎨 2. Results</h3></div>')
354
- image_output = gr.Image(label="πŸ–ΌοΈ Generated Image", type="pil", show_download_button=True, height=512, container=False,elem_classes="preserve-aspect-ratio")
355
  recapped_prompt_output = gr.Textbox(label="πŸ“ Final Prompt Used", lines=5, interactive=False)
356
  status_output = gr.Textbox(label="πŸ“Š Status Log", lines=4, interactive=False)
357
 
 
209
 
210
  custom_css = """
211
  .gradio-container {
212
+ background: linear-gradient(135deg, #3b4371 0%, #2d1b69 25%, #673ab7 50%, #8e24aa 75%, #6a1b9a 100%);
213
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
214
+ min-height: 100vh;
215
  }
216
 
217
  .contain {
 
219
  border-radius: 15px;
220
  padding: 25px;
221
  margin: 15px;
222
+ box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
223
+ backdrop-filter: blur(10px);
224
  }
225
 
226
  .title-container {
227
  text-align: center;
228
  margin-bottom: 25px;
229
  padding: 20px;
230
+ background: linear-gradient(135deg, #673ab7, #8e24aa);
231
  border-radius: 12px;
232
+ box-shadow: 0 5px 20px rgba(103, 58, 183, 0.4);
233
  }
234
 
235
  .title-container h1 {
 
241
  }
242
 
243
  .info-bar {
244
+ background: linear-gradient(135deg, #7c4dff, #6a1b9a);
245
  padding: 12px;
246
  border-radius: 8px;
247
  margin-bottom: 20px;
248
  color: white;
249
  text-align: center;
250
  font-weight: 500;
251
+ box-shadow: 0 3px 12px rgba(124, 77, 255, 0.3);
252
  }
253
 
254
  .section-header {
255
+ background: linear-gradient(135deg, #e1bee7, #d1c4e9);
256
  padding: 12px;
257
  border-radius: 8px;
258
  margin-bottom: 15px;
259
+ border-left: 4px solid #673ab7;
260
  }
261
 
262
  .section-header h3 {
 
266
  }
267
 
268
  .input-group {
269
+ background: rgba(255, 255, 255, 0.85);
270
  padding: 18px;
271
  border-radius: 12px;
272
  margin-bottom: 15px;
273
+ border: 1px solid rgba(103, 58, 183, 0.2);
274
+ box-shadow: 0 3px 12px rgba(103, 58, 183, 0.1);
275
  }
276
 
277
  .result-section {
278
  background: rgba(255, 255, 255, 0.9);
279
  padding: 18px;
280
  border-radius: 12px;
281
+ border: 1px solid rgba(103, 58, 183, 0.2);
282
+ box-shadow: 0 3px 12px rgba(103, 58, 183, 0.1);
283
  }
284
 
285
  .tip-box {
286
+ background: linear-gradient(135deg, #f3e5f5, #e8eaf6);
287
  padding: 10px;
288
  border-radius: 6px;
289
  margin: 8px 0;
290
+ border-left: 3px solid #673ab7;
291
+ color: #4a148c;
292
  font-weight: 500;
293
  }
294
 
295
  button.primary {
296
+ background: linear-gradient(135deg, #673ab7, #8e24aa) !important;
297
  border: none !important;
298
  border-radius: 20px !important;
299
  padding: 12px 25px !important;
300
  color: white !important;
301
  font-weight: bold !important;
302
  font-size: 15px !important;
303
+ box-shadow: 0 5px 15px rgba(103, 58, 183, 0.4) !important;
304
  }
305
 
306
  button.primary:hover {
307
+ box-shadow: 0 8px 25px rgba(103, 58, 183, 0.6) !important;
308
  opacity: 0.9 !important;
309
+ transform: translateY(-2px) !important;
310
  }
311
 
312
+
313
+ label {
314
+ color: #4a148c !important;
315
+ font-weight: 600 !important;
316
+ }
317
+
318
+ input, textarea, select {
319
+ border: 1px solid rgba(103, 58, 183, 0.3) !important;
320
+ border-radius: 6px !important;
321
+ }
322
+
323
+ input:focus, textarea:focus, select:focus {
324
+ border-color: #673ab7 !important;
325
+ box-shadow: 0 0 0 2px rgba(103, 58, 183, 0.2) !important;
326
+ }
327
+
328
+ .gr-slider input[type="range"] {
329
+ accent-color: #673ab7 !important;
330
+ }
331
+
332
+ input[type="checkbox"] {
333
+ accent-color: #673ab7 !important;
334
+ }
335
+
336
+ .input-group textarea {
337
+ color: #9e9e9e !important;
338
+ text-align: center !important;
339
  }
340
 
341
  .preserve-aspect-ratio img {
 
378
 
379
  with gr.Column(scale=1, elem_classes="result-section"):
380
  gr.HTML('<div class="section-header"><h3>🎨 2. Results</h3></div>')
381
+ image_output = gr.Image(label="πŸ–ΌοΈ Generated Image", type="pil", show_download_button=True, height=512, container=False, elem_classes="preserve-aspect-ratio")
382
  recapped_prompt_output = gr.Textbox(label="πŸ“ Final Prompt Used", lines=5, interactive=False)
383
  status_output = gr.Textbox(label="πŸ“Š Status Log", lines=4, interactive=False)
384