fantos commited on
Commit
47297cd
·
verified ·
1 Parent(s): 66fcae2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +29 -11
app.py CHANGED
@@ -65,7 +65,6 @@ footer {display: none !important}
65
  -webkit-background-clip: text;
66
  -webkit-text-fill-color: transparent;
67
  }
68
- /* 갤러리 컨테이너 CSS 수정 */
69
  .gallery-container {
70
  display: grid;
71
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
@@ -74,7 +73,6 @@ footer {display: none !important}
74
  background: rgba(255, 255, 255, 0.05);
75
  border-radius: 8px;
76
  margin-top: 10px;
77
- width: 100%;
78
  }
79
  .gallery-image {
80
  width: 100%;
@@ -86,10 +84,27 @@ footer {display: none !important}
86
  .gallery-image:hover {
87
  transform: scale(1.05);
88
  }
89
- /* 갤러리와 출력 이미지 컨테이너 너비 통일 */
90
  .output-image, #gallery {
91
  width: 100% !important;
92
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
93
  """
94
 
95
  def save_image(image):
@@ -200,12 +215,16 @@ with gr.Blocks(theme=gr.themes.Soft(), css=css) as demo:
200
  </div>
201
  </div>
202
  """)
203
-
204
- with gr.Column(scale=4):
205
- # Current generated image
206
- output = gr.Image(label="Generated Image", elem_id="output-image", elem_classes=["output-image"])
 
 
 
 
207
 
208
- # Gallery of generated images
209
  gallery = gr.Gallery(
210
  label="Generated Images Gallery",
211
  show_label=True,
@@ -214,9 +233,8 @@ with gr.Blocks(theme=gr.themes.Soft(), css=css) as demo:
214
  rows=[2],
215
  height="auto",
216
  object_fit="contain",
217
- elem_classes=["gallery-container"]
218
- )
219
-
220
 
221
 
222
  # Load existing gallery images on startup
 
65
  -webkit-background-clip: text;
66
  -webkit-text-fill-color: transparent;
67
  }
 
68
  .gallery-container {
69
  display: grid;
70
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
 
73
  background: rgba(255, 255, 255, 0.05);
74
  border-radius: 8px;
75
  margin-top: 10px;
 
76
  }
77
  .gallery-image {
78
  width: 100%;
 
84
  .gallery-image:hover {
85
  transform: scale(1.05);
86
  }
87
+ /* 갤러리와 이미지 출력 컨테이너 너비 통일을 위한 추가 CSS */
88
  .output-image, #gallery {
89
  width: 100% !important;
90
  }
91
+ .container, .content {
92
+ width: 100% !important;
93
+ max-width: 100% !important;
94
+ }
95
+ /* 갤러리 컴포넌트 자체의 너비 조절 */
96
+ .gallery-item {
97
+ width: 100% !important;
98
+ max-width: 100% !important;
99
+ }
100
+ .gallery-item > div {
101
+ width: 100% !important;
102
+ }
103
+ /* 이미지 컨테이너 강제 너비 설정 */
104
+ .fixed-width {
105
+ width: 100% !important;
106
+ max-width: none !important;
107
+ }
108
  """
109
 
110
  def save_image(image):
 
215
  </div>
216
  </div>
217
  """)
218
+
219
+ with gr.Column(scale=4, elem_classes=["fixed-width"]):
220
+ # Current generated image
221
+ output = gr.Image(
222
+ label="Generated Image",
223
+ elem_id="output-image",
224
+ elem_classes=["output-image", "fixed-width"]
225
+ )
226
 
227
+ # Gallery of generated images
228
  gallery = gr.Gallery(
229
  label="Generated Images Gallery",
230
  show_label=True,
 
233
  rows=[2],
234
  height="auto",
235
  object_fit="contain",
236
+ elem_classes=["gallery-container", "fixed-width"]
237
+ )
 
238
 
239
 
240
  # Load existing gallery images on startup