Chris Addis commited on
Commit ·
1c02ad4
1
Parent(s): 7cb1d5a
Matcha 2
Browse files
app.py
CHANGED
|
@@ -74,22 +74,10 @@ def get_base_filename(filepath):
|
|
| 74 |
return filename
|
| 75 |
|
| 76 |
custom_css = """
|
| 77 |
-
/* Fixed size container with custom styling */
|
| 78 |
-
.image-container {
|
| 79 |
-
width: 100%;
|
| 80 |
-
height: 600px;
|
| 81 |
-
display: flex;
|
| 82 |
-
align-items: center;
|
| 83 |
-
justify-content: center;
|
| 84 |
-
background-color: #f0f0f0;
|
| 85 |
-
border-radius: 8px;
|
| 86 |
-
overflow: hidden;
|
| 87 |
-
}
|
| 88 |
-
|
| 89 |
.image-container img {
|
| 90 |
object-fit: contain;
|
| 91 |
-
|
| 92 |
-
|
| 93 |
}
|
| 94 |
"""
|
| 95 |
|
|
@@ -183,13 +171,16 @@ def create_demo():
|
|
| 183 |
|
| 184 |
# Right column: Display area
|
| 185 |
with gr.Column(scale=2):
|
| 186 |
-
with gr.Column(elem_classes="
|
| 187 |
current_image = gr.Image(
|
| 188 |
label="Current Image",
|
|
|
|
|
|
|
| 189 |
type="filepath",
|
| 190 |
show_fullscreen_button=True,
|
| 191 |
show_download_button=False,
|
| 192 |
-
show_share_button=False
|
|
|
|
| 193 |
)
|
| 194 |
|
| 195 |
# Navigation row
|
|
|
|
| 74 |
return filename
|
| 75 |
|
| 76 |
custom_css = """
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 77 |
.image-container img {
|
| 78 |
object-fit: contain;
|
| 79 |
+
width: 100%;
|
| 80 |
+
height: 100%;
|
| 81 |
}
|
| 82 |
"""
|
| 83 |
|
|
|
|
| 171 |
|
| 172 |
# Right column: Display area
|
| 173 |
with gr.Column(scale=2):
|
| 174 |
+
with gr.Column(elem_classes="image-container"):
|
| 175 |
current_image = gr.Image(
|
| 176 |
label="Current Image",
|
| 177 |
+
height=600, # Set the maximum desired height
|
| 178 |
+
width=1000,
|
| 179 |
type="filepath",
|
| 180 |
show_fullscreen_button=True,
|
| 181 |
show_download_button=False,
|
| 182 |
+
show_share_button=False,
|
| 183 |
+
elem_classes="image-container"
|
| 184 |
)
|
| 185 |
|
| 186 |
# Navigation row
|