Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -331,23 +331,17 @@ class KDChecker:
|
|
| 331 |
return path
|
| 332 |
|
| 333 |
|
| 334 |
-
# --- ИНТЕРФЕЙС ---
|
| 335 |
|
| 336 |
-
# Усиленные CSS стили для работы с авторизацией
|
| 337 |
css = """
|
|
|
|
| 338 |
.gradio-container { max-width: 95% !important; }
|
| 339 |
|
| 340 |
-
/*
|
| 341 |
-
.compact_file
|
| 342 |
-
|
| 343 |
-
min-height: 150px !important;
|
| 344 |
-
max-height: 150px !important;
|
| 345 |
-
overflow: hidden !important;
|
| 346 |
-
}
|
| 347 |
-
.compact_file {
|
| 348 |
-
height: auto !important;
|
| 349 |
-
}
|
| 350 |
|
|
|
|
| 351 |
.orange_btn {
|
| 352 |
background: #FF7F27 !important;
|
| 353 |
border: none !important;
|
|
@@ -357,14 +351,15 @@ css = """
|
|
| 357 |
}
|
| 358 |
.orange_btn:hover { background: #E06010 !important; }
|
| 359 |
|
|
|
|
| 360 |
footer { display: none !important; }
|
| 361 |
"""
|
| 362 |
|
| 363 |
def create_app():
|
| 364 |
checker = KDChecker()
|
| 365 |
|
| 366 |
-
#
|
| 367 |
-
with gr.Blocks(title="Генератор чек-листов КД"
|
| 368 |
gr.Markdown("## ✅ Генератор чек-листов КД")
|
| 369 |
|
| 370 |
with gr.Row():
|
|
@@ -399,9 +394,12 @@ def create_app():
|
|
| 399 |
|
| 400 |
if __name__ == "__main__":
|
| 401 |
app = create_app()
|
| 402 |
-
#
|
| 403 |
app.launch(
|
| 404 |
server_name="0.0.0.0",
|
| 405 |
server_port=7860,
|
| 406 |
-
auth=("admin", "12345")
|
|
|
|
|
|
|
|
|
|
| 407 |
)
|
|
|
|
| 331 |
return path
|
| 332 |
|
| 333 |
|
| 334 |
+
# --- ИНТЕРФЕЙС И CSS ---
|
| 335 |
|
|
|
|
| 336 |
css = """
|
| 337 |
+
/* Основной контейнер */
|
| 338 |
.gradio-container { max-width: 95% !important; }
|
| 339 |
|
| 340 |
+
/* Уменьшаем высоту загрузчика файлов */
|
| 341 |
+
.compact_file { height: 160px !important; }
|
| 342 |
+
.compact_file .file-container { height: 160px !important; min-height: 160px !important; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 343 |
|
| 344 |
+
/* Кнопка */
|
| 345 |
.orange_btn {
|
| 346 |
background: #FF7F27 !important;
|
| 347 |
border: none !important;
|
|
|
|
| 351 |
}
|
| 352 |
.orange_btn:hover { background: #E06010 !important; }
|
| 353 |
|
| 354 |
+
/* Скрываем подвал */
|
| 355 |
footer { display: none !important; }
|
| 356 |
"""
|
| 357 |
|
| 358 |
def create_app():
|
| 359 |
checker = KDChecker()
|
| 360 |
|
| 361 |
+
# ВАЖНО: Убираем theme и css отсюда, чтобы не было Warning
|
| 362 |
+
with gr.Blocks(title="Генератор чек-листов КД") as app:
|
| 363 |
gr.Markdown("## ✅ Генератор чек-листов КД")
|
| 364 |
|
| 365 |
with gr.Row():
|
|
|
|
| 394 |
|
| 395 |
if __name__ == "__main__":
|
| 396 |
app = create_app()
|
| 397 |
+
# ПЕРЕДАЕМ ПАРАМЕТРЫ СЮДА
|
| 398 |
app.launch(
|
| 399 |
server_name="0.0.0.0",
|
| 400 |
server_port=7860,
|
| 401 |
+
auth=("admin", "12345"),
|
| 402 |
+
theme=gr.themes.Soft(), # Тема
|
| 403 |
+
css=css, # Стили
|
| 404 |
+
ssr_mode=False # Отключаем экспериментальный рендеринг (Решает проблему с интерфейсом)
|
| 405 |
)
|