Update app.py
Browse files
app.py
CHANGED
@@ -125,9 +125,27 @@ css = """
|
|
125 |
object-fit: cover !important;
|
126 |
margin: 5px !important; /* Added margin between thumbs */
|
127 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
"""
|
129 |
|
130 |
|
|
|
131 |
# Class Labels
|
132 |
classes = [
|
133 |
'antelope', 'buffalo', 'chimpanzee', 'cow', 'deer', 'dolphin',
|
@@ -192,8 +210,8 @@ with gr.Blocks(title="Animal Classifier", css=css) as demo:
|
|
192 |
examples_gallery = gr.Gallery(
|
193 |
value=example_images,
|
194 |
label="Example Images (Click to Select)",
|
195 |
-
columns=7,
|
196 |
-
|
197 |
allow_preview=False,
|
198 |
elem_classes=["centered-examples"]
|
199 |
)
|
|
|
125 |
object-fit: cover !important;
|
126 |
margin: 5px !important; /* Added margin between thumbs */
|
127 |
}
|
128 |
+
|
129 |
+
/* 1) Global override: remove any forced sizing on .fixed-height anywhere */
|
130 |
+
.fixed-height.svelte-842rpi.svelte-842rpi {
|
131 |
+
min-height: 0 !important; /* cancel the global min-height */
|
132 |
+
max-height: none !important; /* cancel the global max-height */
|
133 |
+
height: auto !important; /* allow auto height */
|
134 |
+
}
|
135 |
+
|
136 |
+
/* 2) Same-query override: mirror Gradio’s media query exactly */
|
137 |
+
@media (min-width: 1280px) {
|
138 |
+
/* target the exact same class chain inside the breakpoint */
|
139 |
+
.fixed-height.svelte-842rpi.svelte-842rpi {
|
140 |
+
min-height: 0 !important; /* zero-out the 55vh/min-height there */
|
141 |
+
max-height: none !important; /* remove the viewport-height cap */
|
142 |
+
height: auto !important; /* let content dictate height */
|
143 |
+
}
|
144 |
+
}
|
145 |
"""
|
146 |
|
147 |
|
148 |
+
|
149 |
# Class Labels
|
150 |
classes = [
|
151 |
'antelope', 'buffalo', 'chimpanzee', 'cow', 'deer', 'dolphin',
|
|
|
210 |
examples_gallery = gr.Gallery(
|
211 |
value=example_images,
|
212 |
label="Example Images (Click to Select)",
|
213 |
+
columns=7,
|
214 |
+
elem_id="my_media_gallery",
|
215 |
allow_preview=False,
|
216 |
elem_classes=["centered-examples"]
|
217 |
)
|