Download index.html from AssanaliAidarkhan/presentationgeneration: direct link, hf CLI and curl.
- Browser
- Download file 30.5 kB
-
https://huggingface.co/spaces/AssanaliAidarkhan/presentationgeneration/resolve/main/index.html
- Command line
-
hf download hf://spaces/AssanaliAidarkhan/presentationgeneration/index.html
-
curl -L -o index.html https://huggingface.co/spaces/AssanaliAidarkhan/presentationgeneration/resolve/main/index.html
30.5 kB
| <html lang="ru"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>MindIA - Помощник ПЭО</title> | |
| <style> | |
| * { | |
| margin: 0; | |
| padding: 0; | |
| box-sizing: border-box; | |
| } | |
| body { | |
| font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; | |
| background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); | |
| min-height: 100vh; | |
| padding: 20px; | |
| } | |
| .container { | |
| max-width: 1400px; | |
| margin: 0 auto; | |
| background: white; | |
| border-radius: 12px; | |
| box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2); | |
| overflow: hidden; | |
| } | |
| .header { | |
| background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%); | |
| color: white; | |
| padding: 30px; | |
| text-align: center; | |
| } | |
| .header .platform-name { | |
| font-size: 16px; | |
| font-weight: 600; | |
| letter-spacing: 2px; | |
| margin-bottom: 15px; | |
| opacity: 0.9; | |
| } | |
| .header h1 { | |
| font-size: 28px; | |
| margin-bottom: 10px; | |
| } | |
| .header p { | |
| font-size: 14px; | |
| opacity: 0.9; | |
| } | |
| .main-content { | |
| padding: 40px; | |
| } | |
| .section-title { | |
| font-size: 22px; | |
| font-weight: 600; | |
| color: #2c3e50; | |
| margin-bottom: 30px; | |
| display: flex; | |
| align-items: center; | |
| gap: 10px; | |
| } | |
| .cards-grid { | |
| display: grid; | |
| grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); | |
| gap: 25px; | |
| margin-bottom: 50px; | |
| } | |
| .feature-card { | |
| background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%); | |
| border: 2px solid #e9ecef; | |
| border-radius: 12px; | |
| padding: 30px; | |
| transition: all 0.3s; | |
| cursor: pointer; | |
| } | |
| .feature-card:hover { | |
| transform: translateY(-5px); | |
| box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2); | |
| border-color: #667eea; | |
| } | |
| .feature-card .icon { | |
| width: 60px; | |
| height: 60px; | |
| background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); | |
| border-radius: 12px; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| font-size: 28px; | |
| margin-bottom: 20px; | |
| } | |
| .feature-card h3 { | |
| font-size: 20px; | |
| color: #2c3e50; | |
| margin-bottom: 15px; | |
| } | |
| .feature-card p { | |
| color: #6c757d; | |
| line-height: 1.6; | |
| margin-bottom: 20px; | |
| } | |
| .feature-card .btn { | |
| display: inline-flex; | |
| align-items: center; | |
| gap: 8px; | |
| padding: 10px 20px; | |
| background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); | |
| color: white; | |
| border: none; | |
| border-radius: 6px; | |
| font-size: 14px; | |
| font-weight: 600; | |
| cursor: pointer; | |
| transition: all 0.3s; | |
| } | |
| .feature-card .btn:hover { | |
| transform: translateX(5px); | |
| box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4); | |
| } | |
| .benefits-section { | |
| background: #f8f9fa; | |
| padding: 40px; | |
| border-radius: 12px; | |
| margin-top: 40px; | |
| } | |
| .benefits-grid { | |
| display: grid; | |
| grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); | |
| gap: 25px; | |
| margin-top: 30px; | |
| } | |
| .benefit-item { | |
| background: white; | |
| padding: 25px; | |
| border-radius: 8px; | |
| border-left: 4px solid #667eea; | |
| box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); | |
| } | |
| .benefit-item .number { | |
| display: inline-block; | |
| width: 30px; | |
| height: 30px; | |
| background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); | |
| color: white; | |
| border-radius: 50%; | |
| text-align: center; | |
| line-height: 30px; | |
| font-weight: 700; | |
| margin-bottom: 15px; | |
| } | |
| .benefit-item h4 { | |
| font-size: 18px; | |
| color: #2c3e50; | |
| margin-bottom: 10px; | |
| } | |
| .benefit-item p { | |
| color: #6c757d; | |
| line-height: 1.6; | |
| } | |
| .modal { | |
| display: none; | |
| position: fixed; | |
| top: 0; | |
| left: 0; | |
| width: 100%; | |
| height: 100%; | |
| background: rgba(0, 0, 0, 0.6); | |
| z-index: 1000; | |
| align-items: center; | |
| justify-content: center; | |
| } | |
| .modal.active { | |
| display: flex; | |
| } | |
| .modal-content { | |
| background: white; | |
| border-radius: 12px; | |
| max-width: 900px; | |
| width: 90%; | |
| max-height: 90vh; | |
| overflow-y: auto; | |
| box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); | |
| } | |
| .modal-header { | |
| background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); | |
| color: white; | |
| padding: 25px 30px; | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| } | |
| .modal-header h2 { | |
| font-size: 22px; | |
| } | |
| .close-btn { | |
| background: none; | |
| border: none; | |
| color: white; | |
| font-size: 28px; | |
| cursor: pointer; | |
| padding: 0; | |
| width: 30px; | |
| height: 30px; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| } | |
| .close-btn:hover { | |
| opacity: 0.8; | |
| } | |
| .modal-body { | |
| padding: 30px; | |
| } | |
| .form-group { | |
| margin-bottom: 20px; | |
| } | |
| .form-group label { | |
| display: block; | |
| font-size: 14px; | |
| font-weight: 600; | |
| color: #495057; | |
| margin-bottom: 8px; | |
| } | |
| .form-group input, | |
| .form-group select, | |
| .form-group textarea { | |
| width: 100%; | |
| padding: 10px 12px; | |
| border: 1px solid #ced4da; | |
| border-radius: 6px; | |
| font-size: 14px; | |
| font-family: inherit; | |
| transition: all 0.3s; | |
| } | |
| .form-group textarea { | |
| min-height: 120px; | |
| resize: vertical; | |
| } | |
| .form-group input:focus, | |
| .form-group select:focus, | |
| .form-group textarea:focus { | |
| outline: none; | |
| border-color: #667eea; | |
| box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1); | |
| } | |
| .file-upload { | |
| border: 2px dashed #ced4da; | |
| border-radius: 6px; | |
| padding: 30px; | |
| text-align: center; | |
| cursor: pointer; | |
| transition: all 0.3s; | |
| } | |
| .file-upload:hover { | |
| border-color: #667eea; | |
| background: #f8f9fa; | |
| } | |
| .file-upload input[type="file"] { | |
| display: none; | |
| } | |
| .chat-container { | |
| display: flex; | |
| flex-direction: column; | |
| height: 500px; | |
| border: 1px solid #e9ecef; | |
| border-radius: 8px; | |
| overflow: hidden; | |
| } | |
| .chat-messages { | |
| flex: 1; | |
| padding: 20px; | |
| overflow-y: auto; | |
| background: #f8f9fa; | |
| } | |
| .chat-message { | |
| margin-bottom: 15px; | |
| display: flex; | |
| gap: 10px; | |
| } | |
| .chat-message.user { | |
| flex-direction: row-reverse; | |
| } | |
| .message-bubble { | |
| max-width: 70%; | |
| padding: 12px 16px; | |
| border-radius: 12px; | |
| line-height: 1.5; | |
| } | |
| .chat-message.assistant .message-bubble { | |
| background: white; | |
| border: 1px solid #e9ecef; | |
| } | |
| .chat-message.user .message-bubble { | |
| background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); | |
| color: white; | |
| } | |
| .chat-input-area { | |
| padding: 20px; | |
| background: white; | |
| border-top: 1px solid #e9ecef; | |
| display: flex; | |
| gap: 10px; | |
| } | |
| .chat-input-area input { | |
| flex: 1; | |
| padding: 10px 15px; | |
| border: 1px solid #ced4da; | |
| border-radius: 6px; | |
| font-size: 14px; | |
| } | |
| .chat-input-area button { | |
| padding: 10px 20px; | |
| background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); | |
| color: white; | |
| border: none; | |
| border-radius: 6px; | |
| font-weight: 600; | |
| cursor: pointer; | |
| transition: all 0.3s; | |
| } | |
| .chat-input-area button:hover { | |
| transform: translateY(-2px); | |
| box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4); | |
| } | |
| .templates-list { | |
| display: grid; | |
| grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); | |
| gap: 15px; | |
| margin-bottom: 20px; | |
| } | |
| .template-item { | |
| padding: 15px; | |
| border: 2px solid #e9ecef; | |
| border-radius: 8px; | |
| cursor: pointer; | |
| transition: all 0.3s; | |
| text-align: center; | |
| } | |
| .template-item:hover { | |
| border-color: #667eea; | |
| background: #f8f9fa; | |
| } | |
| .template-item.selected { | |
| border-color: #667eea; | |
| background: #e7f3ff; | |
| } | |
| .action-buttons { | |
| display: flex; | |
| gap: 10px; | |
| justify-content: flex-end; | |
| margin-top: 20px; | |
| } | |
| .btn-primary { | |
| padding: 12px 24px; | |
| background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); | |
| color: white; | |
| border: none; | |
| border-radius: 6px; | |
| font-weight: 600; | |
| cursor: pointer; | |
| transition: all 0.3s; | |
| } | |
| .btn-primary:hover { | |
| transform: translateY(-2px); | |
| box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4); | |
| } | |
| .btn-secondary { | |
| padding: 12px 24px; | |
| background: #6c757d; | |
| color: white; | |
| border: none; | |
| border-radius: 6px; | |
| font-weight: 600; | |
| cursor: pointer; | |
| transition: all 0.3s; | |
| } | |
| .btn-secondary:hover { | |
| background: #5a6268; | |
| } | |
| @media (max-width: 768px) { | |
| .main-content { | |
| padding: 20px; | |
| } | |
| .cards-grid { | |
| grid-template-columns: 1fr; | |
| } | |
| .benefits-grid { | |
| grid-template-columns: 1fr; | |
| } | |
| .modal-content { | |
| width: 95%; | |
| } | |
| .message-bubble { | |
| max-width: 85%; | |
| } | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <div class="container"> | |
| <!-- Header --> | |
| <div class="header"> | |
| <div class="platform-name">ПЛАТФОРМА MindIA</div> | |
| <h1>Помощник ПЭО</h1> | |
| <p>Автоматизация работы планово-экономического отдела</p> | |
| </div> | |
| <!-- Main Content --> | |
| <div class="main-content"> | |
| <div class="section-title"> | |
| <span>⚙️</span> Функциональные возможности | |
| </div> | |
| <div class="cards-grid"> | |
| <!-- Card 1: Presentations --> | |
| <div class="feature-card" onclick="openModal('presentationModal')"> | |
| <div class="icon">📊</div> | |
| <h3>Формирование презентаций</h3> | |
| <p>Автоматическое создание и актуализация презентаций на основе актуальных данных и шаблонов</p> | |
| <button class="btn"> | |
| Открыть <span>→</span> | |
| </button> | |
| </div> | |
| <!-- Card 2: Documents Generation --> | |
| <div class="feature-card" onclick="openModal('documentsModal')"> | |
| <div class="icon">📝</div> | |
| <h3>Генерация документов</h3> | |
| <p>Автоматическое формирование пояснительных записок и таблиц по утвержденным шаблонам</p> | |
| <button class="btn"> | |
| Открыть <span>→</span> | |
| </button> | |
| </div> | |
| <!-- Card 3: Chatbot Assistant --> | |
| <div class="feature-card" onclick="openModal('chatbotModal')"> | |
| <div class="icon">💬</div> | |
| <h3>Чат-бот помощник</h3> | |
| <p>Интеллектуальный ассистент для ответов на вопросы и помощи в подготовке документов</p> | |
| <button class="btn"> | |
| Открыть <span>→</span> | |
| </button> | |
| </div> | |
| </div> | |
| <!-- Benefits Section --> | |
| <div class="benefits-section"> | |
| <div class="section-title"> | |
| <span>🎯</span> Ожидаемые результаты | |
| </div> | |
| <div class="benefits-grid"> | |
| <div class="benefit-item"> | |
| <div class="number">1</div> | |
| <h4>Снижение временных и трудозатрат</h4> | |
| <p>Автоматизация рутинных процессов позволяет сократить время на подготовку документов до 70%</p> | |
| </div> | |
| <div class="benefit-item"> | |
| <div class="number">2</div> | |
| <h4>Упрощение подготовки данных</h4> | |
| <p>Быстрая подготовка отчетов и документов для регуляторов (ДКРЕМ и других органов)</p> | |
| </div> | |
| <div class="benefit-item"> | |
| <div class="number">3</div> | |
| <h4>Помощь в работе с документами</h4> | |
| <p>Ответы на типовые вопросы, помощь в подготовке документов, отчетов и аналитических материалов</p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Presentation Modal --> | |
| <div id="presentationModal" class="modal"> | |
| <div class="modal-content"> | |
| <div class="modal-header"> | |
| <h2>📊 Формирование презентаций</h2> | |
| <button class="close-btn" onclick="closeModal('presentationModal')">×</button> | |
| </div> | |
| <div class="modal-body"> | |
| <div class="form-group"> | |
| <label>Выберите шаблон презентации:</label> | |
| <div class="templates-list"> | |
| <div class="template-item" onclick="selectTemplate(this)"> | |
| <div style="font-size: 24px; margin-bottom: 10px;">📈</div> | |
| <div style="font-weight: 600;">Финансовый отчет</div> | |
| </div> | |
| <div class="template-item" onclick="selectTemplate(this)"> | |
| <div style="font-size: 24px; margin-bottom: 10px;">📊</div> | |
| <div style="font-weight: 600;">Годовой отчет</div> | |
| </div> | |
| <div class="template-item" onclick="selectTemplate(this)"> | |
| <div style="font-size: 24px; margin-bottom: 10px;">💼</div> | |
| <div style="font-weight: 600;">Бизнес-план</div> | |
| </div> | |
| <div class="template-item" onclick="selectTemplate(this)"> | |
| <div style="font-size: 24px; margin-bottom: 10px;">📉</div> | |
| <div style="font-weight: 600;">Анализ показателей</div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="form-group"> | |
| <label>Период отчета:</label> | |
| <select> | |
| <option value="">Выберите период</option> | |
| <option value="q1">1 квартал 2024</option> | |
| <option value="q2">2 квартал 2024</option> | |
| <option value="q3">3 квартал 2024</option> | |
| <option value="q4">4 квартал 2024</option> | |
| <option value="year">2024 год</option> | |
| </select> | |
| </div> | |
| <div class="form-group"> | |
| <label>Загрузить данные (опционально):</label> | |
| <div class="file-upload" onclick="document.getElementById('presentationFile').click()"> | |
| <input type="file" id="presentationFile" accept=".xlsx,.csv,.json"> | |
| <div style="font-size: 40px; margin-bottom: 10px;">📁</div> | |
| <div style="font-weight: 600; margin-bottom: 5px;">Нажмите для загрузки файла</div> | |
| <div style="font-size: 12px; color: #6c757d;">Excel, CSV или JSON</div> | |
| </div> | |
| </div> | |
| <div class="form-group"> | |
| <label>Дополнительные комментарии:</label> | |
| <textarea placeholder="Укажите специфические требования или комментарии..."></textarea> | |
| </div> | |
| <div class="action-buttons"> | |
| <button class="btn-secondary" onclick="closeModal('presentationModal')">Отмена</button> | |
| <button class="btn-primary" onclick="generatePresentation()">Сгенерировать презентацию</button> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Documents Modal --> | |
| <div id="documentsModal" class="modal"> | |
| <div class="modal-content"> | |
| <div class="modal-header"> | |
| <h2>📝 Генерация документов</h2> | |
| <button class="close-btn" onclick="closeModal('documentsModal')">×</button> | |
| </div> | |
| <div class="modal-body"> | |
| <div class="form-group"> | |
| <label>Тип документа:</label> | |
| <select id="docType" onchange="updateDocumentForm()"> | |
| <option value="">Выберите тип документа</option> | |
| <option value="explanatory">Пояснительная записка</option> | |
| <option value="table">Таблица данных</option> | |
| <option value="report">Отчет для регулятора</option> | |
| <option value="analysis">Аналитическая справка</option> | |
| </select> | |
| </div> | |
| <div class="form-group"> | |
| <label>Выберите шаблон:</label> | |
| <div class="templates-list"> | |
| <div class="template-item" onclick="selectTemplate(this)"> | |
| <div style="font-size: 24px; margin-bottom: 10px;">📋</div> | |
| <div style="font-weight: 600;">ДКРЕМ отчет</div> | |
| </div> | |
| <div class="template-item" onclick="selectTemplate(this)"> | |
| <div style="font-size: 24px; margin-bottom: 10px;">📄</div> | |
| <div style="font-weight: 600;">Квартальный отчет</div> | |
| </div> | |
| <div class="template-item" onclick="selectTemplate(this)"> | |
| <div style="font-size: 24px; margin-bottom: 10px;">📊</div> | |
| <div style="font-weight: 600;">Финансовые показатели</div> | |
| </div> | |
| <div class="template-item" onclick="selectTemplate(this)"> | |
| <div style="font-size: 24px; margin-bottom: 10px;">📈</div> | |
| <div style="font-weight: 600;">Пользовательский</div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="form-group"> | |
| <label>Период:</label> | |
| <div style="display: grid; grid-template-columns: 1fr 1fr; gap: 10px;"> | |
| <input type="date" placeholder="Дата начала"> | |
| <input type="date" placeholder="Дата окончания"> | |
| </div> | |
| </div> | |
| <div class="form-group"> | |
| <label>Исходные данные:</label> | |
| <div class="file-upload" onclick="document.getElementById('documentFile').click()"> | |
| <input type="file" id="documentFile" accept=".xlsx,.csv,.json" multiple> | |
| <div style="font-size: 40px; margin-bottom: 10px;">📁</div> | |
| <div style="font-weight: 600; margin-bottom: 5px;">Загрузить файлы данных</div> | |
| <div style="font-size: 12px; color: #6c757d;">Поддерживается загрузка нескольких файлов</div> | |
| </div> | |
| </div> | |
| <div class="form-group"> | |
| <label>Специальные инструкции:</label> | |
| <textarea placeholder="Укажите особые требования к формированию документа..."></textarea> | |
| </div> | |
| <div class="action-buttons"> | |
| <button class="btn-secondary" onclick="closeModal('documentsModal')">Отмена</button> | |
| <button class="btn-primary" onclick="generateDocument()">Сгенерировать документ</button> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Chatbot Modal --> | |
| <div id="chatbotModal" class="modal"> | |
| <div class="modal-content"> | |
| <div class="modal-header"> | |
| <h2>💬 Чат-бот помощник ПЭО</h2> | |
| <button class="close-btn" onclick="closeModal('chatbotModal')">×</button> | |
| </div> | |
| <div class="modal-body"> | |
| <div class="chat-container"> | |
| <div class="chat-messages" id="chatMessages"> | |
| <div class="chat-message assistant"> | |
| <div class="message-bubble"> | |
| Здравствуйте! Я ваш помощник для работы с документами ПЭО. Я могу помочь вам с: | |
| <br><br> | |
| • Подготовкой документов и отчетов<br> | |
| • Ответами на вопросы по процедурам<br> | |
| • Поиском информации в регламентах<br> | |
| • Расчетами и формулами<br> | |
| <br> | |
| Чем могу помочь? | |
| </div> | |
| </div> | |
| </div> | |
| <div class="chat-input-area"> | |
| <input type="text" id="chatInput" placeholder="Введите ваш вопрос..." onkeypress="handleChatKeypress(event)"> | |
| <button onclick="sendMessage()">Отправить</button> | |
| </div> | |
| </div> | |
| <div style="margin-top: 20px; padding: 15px; background: #f8f9fa; border-radius: 8px;"> | |
| <div style="font-weight: 600; margin-bottom: 10px;">💡 Примеры вопросов:</div> | |
| <div style="display: flex; flex-wrap: wrap; gap: 10px;"> | |
| <button class="btn-secondary" style="padding: 8px 15px; font-size: 13px;" onclick="askQuestion('Как подготовить отчет для ДКРЕМ?')"> | |
| Как подготовить отчет для ДКРЕМ? | |
| </button> | |
| <button class="btn-secondary" style="padding: 8px 15px; font-size: 13px;" onclick="askQuestion('Какие данные нужны для квартального отчета?')"> | |
| Какие данные нужны для квартального отчета? | |
| </button> | |
| <button class="btn-secondary" style="padding: 8px 15px; font-size: 13px;" onclick="askQuestion('Как рассчитать плановые показатели?')"> | |
| Как рассчитать плановые показатели? | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <script> | |
| function openModal(modalId) { | |
| document.getElementById(modalId).classList.add('active'); | |
| } | |
| function closeModal(modalId) { | |
| document.getElementById(modalId).classList.remove('active'); | |
| } | |
| function selectTemplate(element) { | |
| const parent = element.parentElement; | |
| const items = parent.querySelectorAll('.template-item'); | |
| items.forEach(item => item.classList.remove('selected')); | |
| element.classList.add('selected'); | |
| } | |
| function generatePresentation() { | |
| alert('Презентация генерируется...\n\nВаша презентация будет готова через несколько минут. Вы получите уведомление, когда файл будет готов к скачиванию.'); | |
| closeModal('presentationModal'); | |
| } | |
| function generateDocument() { | |
| alert('Документ генерируется...\n\nВаш документ будет готов через несколько минут. Вы получите уведомление, когда файл будет готов к скачиванию.'); | |
| closeModal('documentsModal'); | |
| } | |
| function updateDocumentForm() { | |
| const docType = document.getElementById('docType').value; | |
| console.log('Selected document type:', docType); | |
| } | |
| function sendMessage() { | |
| const input = document.getElementById('chatInput'); | |
| const message = input.value.trim(); | |
| if (message === '') return; | |
| const chatMessages = document.getElementById('chatMessages'); | |
| // Add user message | |
| const userMessage = document.createElement('div'); | |
| userMessage.className = 'chat-message user'; | |
| userMessage.innerHTML = `<div class="message-bubble">${message}</div>`; | |
| chatMessages.appendChild(userMessage); | |
| input.value = ''; | |
| // Simulate bot response | |
| setTimeout(() => { | |
| const botMessage = document.createElement('div'); | |
| botMessage.className = 'chat-message assistant'; | |
| botMessage.innerHTML = `<div class="message-bubble">Спасибо за ваш вопрос. Я обрабатываю информацию и готовлю ответ. В реальной системе здесь будет интеллектуальный ответ на основе ИИ.</div>`; | |
| chatMessages.appendChild(botMessage); | |
| chatMessages.scrollTop = chatMessages.scrollHeight; | |
| }, 1000); | |
| chatMessages.scrollTop = chatMessages.scrollHeight; | |
| } | |
| function handleChatKeypress(event) { | |
| if (event.key === 'Enter') { | |
| sendMessage(); | |
| } | |
| } | |
| function askQuestion(question) { | |
| document.getElementById('chatInput').value = question; | |
| sendMessage(); | |
| } | |
| // Close modal when clicking outside | |
| window.onclick = function(event) { | |
| if (event.target.classList.contains('modal')) { | |
| event.target.classList.remove('active'); | |
| } | |
| } | |
| // File upload handling | |
| document.getElementById('presentationFile').addEventListener('change', function(e) { | |
| if (e.target.files.length > 0) { | |
| alert('Файл загружен: ' + e.target.files[0].name); | |
| } | |
| }); | |
| document.getElementById('documentFile').addEventListener('change', function(e) { | |
| if (e.target.files.length > 0) { | |
| const fileNames = Array.from(e.target.files).map(f => f.name).join(', '); | |
| alert('Файлы загружены: ' + fileNames); | |
| } | |
| }); | |
| </script> | |
| </body> | |
| </html> |