KangLiao commited on
Commit
c9fcfc6
·
1 Parent(s): 70207e5
Files changed (1) hide show
  1. app.py +90 -1
app.py CHANGED
@@ -222,7 +222,96 @@ def generate_image(prompt_scene,
222
  css = '''
223
  .gradio-container {max-width: 960px !important}
224
  '''
225
- with gr.Blocks(css=css) as demo:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
226
  #gr.Markdown("# Puffin")
227
  gr.Markdown(description)
228
 
 
222
  css = '''
223
  .gradio-container {max-width: 960px !important}
224
  '''
225
+
226
+ custom_css = """
227
+ #input-image {
228
+ aspect-ratio: 1 / 1;
229
+ width: 100%;
230
+ max-width: 100%;
231
+ height: auto;
232
+ display: flex;
233
+ align-items: center;
234
+ justify-content: center;
235
+ }
236
+ #input-image img {
237
+ max-width: 100%;
238
+ max-height: 100%;
239
+ object-fit: contain;
240
+ display: block;
241
+ }
242
+ #main-columns {
243
+ gap: 60px;
244
+ }
245
+ #main-columns > .gr-column {
246
+ flex: 1;
247
+ }
248
+ #compare-image {
249
+ width: 100%;
250
+ aspect-ratio: 1 / 1;
251
+ display: flex;
252
+ align-items: center;
253
+ justify-content: center;
254
+ margin: 0;
255
+ padding: 0;
256
+ max-width: 100%;
257
+ box-sizing: border-box;
258
+ }
259
+ #compare-image svg.svelte-zyxd38 {
260
+ position: absolute !important;
261
+ top: 50% !important;
262
+ left: 50% !important;
263
+ transform: translate(-50%, -50%) !important;
264
+ }
265
+ #compare-image .icon.svelte-1oiin9d {
266
+ position: absolute;
267
+ top: 50%;
268
+ left: 50%;
269
+ transform: translate(-50%, -50%);
270
+ }
271
+ #compare-image {
272
+ position: relative;
273
+ overflow: hidden;
274
+ }
275
+ .new_button {background-color: #171717 !important; color: #ffffff !important; border: none !important;}
276
+ .new_button:hover {background-color: #4b4b4b !important;}
277
+ #start-button {
278
+ background: linear-gradient(135deg, #2575fc 0%, #6a11cb 100%);
279
+ color: white;
280
+ border: none;
281
+ padding: 12px 24px;
282
+ font-size: 16px;
283
+ font-weight: bold;
284
+ border-radius: 12px;
285
+ cursor: pointer;
286
+ box-shadow: 0 0 12px rgba(100, 100, 255, 0.7);
287
+ transition: all 0.3s ease;
288
+ }
289
+ #start-button:hover {
290
+ transform: scale(1.05);
291
+ box-shadow: 0 0 20px rgba(100, 100, 255, 1);
292
+ }
293
+ <style>
294
+ .button-wrapper {
295
+ width: 30%;
296
+ text-align: center;
297
+ }
298
+ .wide-button {
299
+ width: 83% !important;
300
+ background-color: black !important;
301
+ color: white !important;
302
+ border: none !important;
303
+ padding: 8px 0 !important;
304
+ font-size: 16px !important;
305
+ display: inline-block;
306
+ margin: 30px 0px 0px 50px ;
307
+ }
308
+ .wide-button:hover {
309
+ background-color: #656262 !important;
310
+ }
311
+ </style>
312
+ """
313
+
314
+ with gr.Blocks(css=custom_css) as demo:
315
  #gr.Markdown("# Puffin")
316
  gr.Markdown(description)
317