Files
lgcosta 8eeb6b89f4 fix: responder a partir dos livros com embeddings em português
Usa o modelo multilingual, ignora trechos curtos e o template do Llama 3.2
para a resposta sair em uma frase completa. O chat deixa a API livre durante
a geração, o upload indexa o PDF e os agendamentos não são gravados duas vezes.
2026-11-01 12:34:54 -03:00

72 lines
2.8 KiB
HTML

<!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sistema RAG Espiritismo</title>
<link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ctext y='.9em' font-size='90'%3E📚%3C/text%3E%3C/svg%3E">
<link rel="stylesheet" href="/static/css/style.css">
</head>
<body>
<div class="container">
<header>
<h1>📚 Sistema RAG Espiritismo</h1>
<p>Consulte livros de espiritismo com IA</p>
</header>
<div class="grid">
<!-- Chat Section -->
<div class="card chat-card">
<h2>💬 Chat com IA</h2>
<div class="chat-container">
<div id="chat-messages" class="chat-messages">
<div class="message bot">
<div class="message-content">
Olá! Sou um assistente especializado em espiritismo. Posso responder perguntas sobre os livros carregados. Como posso ajudá-lo hoje?
</div>
</div>
</div>
<input type="text" id="chat-input" placeholder="Digite sua pergunta..." />
<button id="send-btn">Enviar</button>
</div>
</div>
<!-- Upload Section -->
<div class="card upload-card">
<h2>📁 Upload de PDFs</h2>
<input type="file" id="file-input" class="file-input" accept=".pdf" />
<button id="upload-btn">Upload PDF</button>
<div id="upload-status"></div>
</div>
</div>
<div class="grid" style="margin-top: 20px;">
<!-- Books Section -->
<div class="card books-card">
<h2>📖 Livros Disponíveis</h2>
<div id="books-list">
<p style="color: #666;">Carregando livros...</p>
</div>
</div>
<!-- Schedules Section -->
<div class="card schedules-card">
<h2>⏰ Agendar Mensagens</h2>
<div style="margin-bottom: 15px;">
<input type="datetime-local" id="schedule-time" />
<select id="schedule-book">
<option value="">Todos os livros</option>
</select>
<button id="add-schedule-btn">Adicionar Agendamento</button>
</div>
<div id="schedules-list">
<p style="color: #666;">Nenhum agendamento.</p>
</div>
</div>
</div>
</div>
<script src="/static/js/script.js"></script>
</body>
</html>