seawolf2357 commited on
Commit
81a5368
·
verified ·
1 Parent(s): c5c8a09

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -3
app.py CHANGED
@@ -56,7 +56,19 @@ examples = [
56
  css = """
57
  footer {visibility: hidden;}
58
  .container {max-width: 1200px; margin: auto; padding: 20px;}
59
- .generate-box {background-color: #f0f0f0; border-radius: 10px; padding: 20px; margin-bottom: 20px;}
 
 
 
 
 
 
 
 
 
 
 
 
60
  .generate-box .row {display: flex; align-items: center; margin-bottom: 10px;}
61
  .generate-box .row > * {margin-right: 10px;}
62
  .generate-box .row > *:last-child {margin-right: 0;}
@@ -71,7 +83,7 @@ with gr.Blocks(theme="Nymbo/Nymbo_Theme", css=css) as demo:
71
 
72
  with gr.Row():
73
  with gr.Column(scale=2):
74
- result = gr.Image(label="Generated Image", show_label=False, interactive=False)
75
  with gr.Column(scale=1):
76
  with gr.Column(elem_classes="generate-box"):
77
  prompt = gr.Text(
@@ -94,7 +106,7 @@ with gr.Blocks(theme="Nymbo/Nymbo_Theme", css=css) as demo:
94
  height = gr.Slider(label="Height", minimum=256, maximum=MAX_IMAGE_SIZE, step=32, value=DEFAULT_HEIGHT)
95
 
96
  with gr.Column(elem_classes="examples-gallery"):
97
- gr.Markdown("### 🌟 Inspiration Gallery")
98
  gr.Examples(
99
  examples=examples,
100
  fn=generate_image,
 
56
  css = """
57
  footer {visibility: hidden;}
58
  .container {max-width: 1200px; margin: auto; padding: 20px;}
59
+ .generate-box, .image-box {
60
+ background-color: #f0f0f0;
61
+ border-radius: 10px;
62
+ padding: 20px;
63
+ margin-bottom: 20px;
64
+ height: 100%; /* Set height to 100% */
65
+ display: flex;
66
+ flex-direction: column;
67
+ }
68
+ .image-box img {
69
+ max-height: 100%;
70
+ object-fit: contain;
71
+ }
72
  .generate-box .row {display: flex; align-items: center; margin-bottom: 10px;}
73
  .generate-box .row > * {margin-right: 10px;}
74
  .generate-box .row > *:last-child {margin-right: 0;}
 
83
 
84
  with gr.Row():
85
  with gr.Column(scale=2):
86
+ result = gr.Image(label="Generated Image", show_label=False, interactive=False, elem_classes="image-box")
87
  with gr.Column(scale=1):
88
  with gr.Column(elem_classes="generate-box"):
89
  prompt = gr.Text(
 
106
  height = gr.Slider(label="Height", minimum=256, maximum=MAX_IMAGE_SIZE, step=32, value=DEFAULT_HEIGHT)
107
 
108
  with gr.Column(elem_classes="examples-gallery"):
109
+ gr.Markdown("### Gallery")
110
  gr.Examples(
111
  examples=examples,
112
  fn=generate_image,