Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -211,46 +211,45 @@ class CustomTheme(gr.themes.Base):
|
|
211 |
)
|
212 |
|
213 |
css = """
|
214 |
-
/*
|
215 |
-
*, *::before, *::after {
|
216 |
-
box-sizing: border-box;
|
217 |
-
}
|
218 |
-
|
219 |
html, body {
|
|
|
|
|
220 |
background-color: #191a1e !important;
|
221 |
-
|
222 |
-
|
223 |
-
width: 100vw !important;
|
224 |
-
height: 100vh !important;
|
225 |
-
}
|
226 |
-
|
227 |
-
/* Перекрываем потенциальные обёртки Hugging Face */
|
228 |
-
#root, #__next, body > div, body > div > div, body > div > div > div {
|
229 |
-
background-color: #191a1e !important;
|
230 |
-
margin: 0 !important;
|
231 |
-
padding: 0 !important;
|
232 |
-
border: none !important;
|
233 |
-
width: 100% !important;
|
234 |
-
height: 100% !important;
|
235 |
}
|
236 |
|
|
|
237 |
.gradio-container, .gr-app {
|
238 |
background-color: #191a1e !important;
|
239 |
-
|
240 |
-
|
|
|
|
|
241 |
}
|
242 |
|
|
|
243 |
.gr-block, .gr-row, .gr-column, .gr-box,
|
244 |
.gr-examples, .gr-examples .gr-box, .gr-examples .gr-card {
|
245 |
background-color: #191a1e !important;
|
246 |
border: none !important;
|
247 |
}
|
248 |
|
249 |
-
/*
|
250 |
-
|
251 |
-
|
|
|
|
|
252 |
}
|
253 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
254 |
.generate-button {
|
255 |
background-color: #5271FF !important;
|
256 |
color: #FFFFFF !important;
|
@@ -261,12 +260,24 @@ html, body {
|
|
261 |
border-radius: 0.3em !important;
|
262 |
}
|
263 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
264 |
footer {
|
265 |
-
|
266 |
-
height: 0 !important;
|
267 |
-
margin: 0 !important;
|
268 |
-
padding: 0 !important;
|
269 |
-
overflow: hidden !important;
|
270 |
}
|
271 |
"""
|
272 |
|
@@ -312,7 +323,7 @@ with gr.Blocks(theme=CustomTheme(), css=css) as demo:
|
|
312 |
elem_classes="generate-button",
|
313 |
)
|
314 |
|
315 |
-
with gr.Column(
|
316 |
output_3d = LitModel3D(
|
317 |
label="3D Model",
|
318 |
visible=False,
|
|
|
211 |
)
|
212 |
|
213 |
css = """
|
214 |
+
/* Сбрасываем отступы и делаем адаптив */
|
|
|
|
|
|
|
|
|
215 |
html, body {
|
216 |
+
margin: 0;
|
217 |
+
padding: 0;
|
218 |
background-color: #191a1e !important;
|
219 |
+
color: #FFFFFF;
|
220 |
+
font-family: 'Poppins', sans-serif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
221 |
}
|
222 |
|
223 |
+
/* Общий контейнер приложения */
|
224 |
.gradio-container, .gr-app {
|
225 |
background-color: #191a1e !important;
|
226 |
+
display: flex;
|
227 |
+
flex-direction: column;
|
228 |
+
min-height: 100vh; /* тянем на всю высоту окна */
|
229 |
+
width: 100%;
|
230 |
}
|
231 |
|
232 |
+
/* Основная обертка под контент */
|
233 |
.gr-block, .gr-row, .gr-column, .gr-box,
|
234 |
.gr-examples, .gr-examples .gr-box, .gr-examples .gr-card {
|
235 |
background-color: #191a1e !important;
|
236 |
border: none !important;
|
237 |
}
|
238 |
|
239 |
+
/* Верхний ряд с контентом будет адаптивным */
|
240 |
+
.gr-row {
|
241 |
+
display: flex;
|
242 |
+
flex-wrap: wrap;
|
243 |
+
gap: 20px;
|
244 |
}
|
245 |
|
246 |
+
/* Колонки также адаптивны */
|
247 |
+
.gr-column {
|
248 |
+
flex: 1 1 300px;
|
249 |
+
min-width: 300px;
|
250 |
+
}
|
251 |
+
|
252 |
+
/* Кнопка */
|
253 |
.generate-button {
|
254 |
background-color: #5271FF !important;
|
255 |
color: #FFFFFF !important;
|
|
|
260 |
border-radius: 0.3em !important;
|
261 |
}
|
262 |
|
263 |
+
/* Примеры (Examples) делаем адаптивными внизу */
|
264 |
+
.gr-examples {
|
265 |
+
display: flex !important;
|
266 |
+
flex-wrap: wrap !important;
|
267 |
+
gap: 10px !important;
|
268 |
+
justify-content: flex-start !important;
|
269 |
+
align-items: center !important;
|
270 |
+
}
|
271 |
+
|
272 |
+
/* Пример одной картинки */
|
273 |
+
.gr-examples img {
|
274 |
+
max-height: 64px;
|
275 |
+
object-fit: contain;
|
276 |
+
}
|
277 |
+
|
278 |
+
/* Скрываем футер */
|
279 |
footer {
|
280 |
+
display: none !important;
|
|
|
|
|
|
|
|
|
281 |
}
|
282 |
"""
|
283 |
|
|
|
323 |
elem_classes="generate-button",
|
324 |
)
|
325 |
|
326 |
+
with gr.Column():
|
327 |
output_3d = LitModel3D(
|
328 |
label="3D Model",
|
329 |
visible=False,
|