Spaces:
Runtime error
Runtime error
| import gradio as gr | |
| import os | |
| # 1. Скопируйте ТЕМУ из приватного приложения | |
| theme = gr.themes.Base( | |
| secondary_hue="rose", | |
| neutral_hue="stone", | |
| ).set( | |
| body_background_fill='*primary_50', | |
| body_text_color='*primary_900', | |
| body_text_size='*text_lg', | |
| body_text_color_subdued='*primary_700', | |
| body_text_weight='600' | |
| ) | |
| # 2. Скопируйте ВЕСЬ CSS из приватного приложения | |
| css = """ | |
| /* Основной фон */ | |
| /*.gradio-container { | |
| background-color: #fef3c7; | |
| } */ | |
| /* Заголовок */ | |
| /* .main-title h2 { */ | |
| text-align: left; | |
| font-size: 2rem; | |
| margin: 0; /* Убираем отступы вокруг заголовка */ | |
| /*color: #003366;*/ | |
| margin-bottom: -5px; !important /* Убираем отступ снизу заголовка */ | |
| padding: 0; | |
| } | |
| /* Цитата */ | |
| .quote-block { | |
| text-align: left; | |
| /*font-style: italic;*/ | |
| padding: 0; | |
| margin: -1px 0 0 0; /* верхний небольшой отступ, снизу чуть больше */ | |
| /*max-width: 30em;*/ /* ограничиваем ширину, чтобы не тянулась на всю строку */ | |
| line-height: 1.4em; | |
| } | |
| /* .left-col { */ | |
| /* background-color: #CDE8FA; /* более тёмный голубой */ | |
| /* padding: 20px; */ | |
| /* Можно и цвет текста подкорректировать */ | |
| /* color: #003366; */ | |
| /* } */ | |
| .right-col { | |
| background-color: #F0FAFF; /* посветлее */ | |
| padding: 0px; | |
| color: #fef3c7; | |
| } | |
| /* Поле для конспекта */ | |
| #plan-output { | |
| border: 2px dashed #bbb; | |
| border-radius: 12px; | |
| background-color: ##f5f5f5; | |
| padding: 20px; | |
| min-height: 1050px; | |
| color: #555; | |
| box-shadow: 0 2px 6px rgba(0,0,0,0.05); | |
| } | |
| /*#f5f5f5*/ | |
| /* Стилизуем заголовок аккордеона (самую "кнопку") */ | |
| .feedback-button { | |
| font-weight: bold; | |
| text-align: center; | |
| background-color: #f1f1f1; | |
| padding: 12px 18px; | |
| border-radius: 10px; | |
| margin-top: 12px; | |
| } | |
| .feedback-confirmation { | |
| display: block !important; | |
| margin-top: 10px; | |
| color: green; | |
| } | |
| """ | |
| # 3. Загружаем приватное приложение | |
| private_app = gr.load( | |
| "zenivan/LogoKonspekt_core", | |
| src="spaces", | |
| token=os.getenv("HF_token") | |
| ) | |
| # 4. Создаём интерфейс с ТЕМИ ЖЕ параметрами | |
| with gr.Blocks(theme=theme, css=css) as demo: | |
| private_app.render() | |
| demo.launch(ssr_mode=False) | |