Spaces:
Sleeping
Sleeping
<html lang="ko"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>RAG ๊ฒ์ ์ฑ๋ด</title> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css"> | |
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}"> | |
<link rel="stylesheet" href="{{ url_for('static', filename='css/device-style.css') }}"> | |
</head> | |
<body> | |
<div class="container"> | |
<header> | |
<h1>RAG ๊ฒ์ ์ฑ๋ด</h1> | |
<div class="header-actions"> | |
<div class="llm-selector"> | |
<label for="llmSelect">LLM ์ ํ:</label> | |
<select id="llmSelect"> | |
<!-- ์ต์ ์ JavaScript์์ ๋์ ์ผ๋ก ๋ก๋๋ฉ๋๋ค --> | |
</select> | |
</div> | |
<div class="user-info"> | |
<span>์ฌ์ฉ์: {% if session.username %}{{ session.username }}{% else %}์๋{% endif %}</span> | |
<a href="{{ url_for('logout') }}" class="logout-button"> | |
<i class="fas fa-sign-out-alt"></i> ๋ก๊ทธ์์ | |
</a> | |
</div> | |
</div> | |
<div class="tabs"> | |
<button id="chatTab" class="tab active">๋ํ</button> | |
<button id="docsTab" class="tab">๋ฌธ์๊ด๋ฆฌ</button> | |
<button id="deviceTab" class="tab">์ฅ์น์ ์ด</button> | |
</div> | |
</header> | |
<main> | |
<!-- ๋ํ ํญ --> | |
<section id="chatSection" class="tab-content active"> | |
<div class="chat-container"> | |
<div class="chat-messages" id="chatMessages"> | |
<div class="message system"> | |
<div class="message-content"> | |
<p>์๋ ํ์ธ์! ์ง์๋ฒ ์ด์ค์ ๋ํด ๊ถ๊ธํ ์ ์ ๋ฌผ์ด๋ณด์ธ์. ์์ฑ์ผ๋ก ์ง๋ฌธํ์๋ ค๋ฉด ๋ง์ดํฌ ๋ฒํผ์ ๋๋ฅด์ธ์.</p> | |
</div> | |
</div> | |
</div> | |
<div class="chat-input-container"> | |
<textarea id="userInput" placeholder="๋ฉ์์ง๋ฅผ ์ ๋ ฅํ์ธ์..." rows="1"></textarea> | |
<button id="micButton" class="mic-button"> | |
<i class="fas fa-microphone"></i> | |
</button> | |
<button id="sendButton" class="send-button"> | |
<i class="fas fa-paper-plane"></i> | |
</button> | |
</div> | |
<div id="recordingStatus" class="recording-status hidden"> | |
<div class="recording-indicator"> | |
<div class="recording-pulse"></div> | |
</div> | |
<span>๋ น์ ์ค...</span> | |
<button id="stopRecordingButton" class="stop-recording-button"> | |
<i class="fas fa-stop"></i> | |
</button> | |
</div> | |
</div> | |
</section> | |
<!-- ๋ฌธ์๊ด๋ฆฌ ํญ --> | |
<section id="docsSection" class="tab-content"> | |
<div class="docs-container"> | |
<div class="upload-section"> | |
<h2>๋ฌธ์ ์ ๋ก๋</h2> | |
<p>์ง์๋ฒ ์ด์ค์ ์ถ๊ฐํ ๋ฌธ์๋ฅผ ์ ๋ก๋ํ์ธ์. (์ง์ ํ์: .txt, .md, .csv)</p> | |
<form id="uploadForm" enctype="multipart/form-data"> | |
<div class="file-upload"> | |
<input type="file" id="documentFile" name="document" accept=".txt,.md,.csv"> | |
<label for="documentFile">ํ์ผ ์ ํ</label> | |
<span id="fileName">์ ํ๋ ํ์ผ ์์</span> | |
</div> | |
<button type="submit" id="uploadButton" class="upload-button"> | |
<i class="fas fa-upload"></i> ์ ๋ก๋ | |
</button> | |
</form> | |
<div id="uploadStatus" class="upload-status hidden"></div> | |
</div> | |
<div class="docs-list-section"> | |
<h2>๋ฌธ์ ๋ชฉ๋ก</h2> | |
<button id="refreshDocsButton" class="refresh-button"> | |
<i class="fas fa-sync-alt"></i> ์๋ก๊ณ ์นจ | |
</button> | |
<div class="docs-list-container"> | |
<table id="docsList" class="docs-list"> | |
<thead> | |
<tr> | |
<th>ํ์ผ๋ช </th> | |
<th>์ฒญํฌ ์</th> | |
<th>์ ํ</th> | |
</tr> | |
</thead> | |
<tbody> | |
<!-- ๋ฌธ์ ๋ชฉ๋ก์ด ์ฌ๊ธฐ์ ๋์ ์ผ๋ก ์ถ๊ฐ๋ฉ๋๋ค --> | |
</tbody> | |
</table> | |
<div id="docsLoading" class="loading-indicator"> | |
<div class="spinner"></div> | |
<p>๋ฌธ์ ๋ก๋ฉ ์ค...</p> | |
</div> | |
<div id="noDocsMessage" class="no-docs-message hidden"> | |
<p>์ง์๋ฒ ์ด์ค์ ๋ฑ๋ก๋ ๋ฌธ์๊ฐ ์์ต๋๋ค. ๋ฌธ์๋ฅผ ์ ๋ก๋ํด ์ฃผ์ธ์.</p> | |
</div> | |
</div> | |
</div> | |
</div> | |
</section> | |
<!-- ์ฅ์น ์ ์ด ํญ --> | |
<section id="deviceSection" class="tab-content"> | |
<div class="device-connection"> | |
<h3>1. ์ฅ์น ์๋ฒ ์ฐ๊ฒฐ</h3> | |
<div class="device-connection-form"> | |
<input type="text" id="deviceServerUrlInput" placeholder="LocalPCAgent Ngrok URL ์ ๋ ฅ (https://xxxx-xx-xxx-xxx.ngrok-free.app ํ์)"> | |
<button id="connectDeviceServerBtn">์ฐ๊ฒฐ</button> | |
</div> | |
<div id="deviceConnectionStatus" class="connection-status disconnected">์ฐ๊ฒฐ ์ํ: ์ฐ๊ฒฐ๋์ง ์์</div> | |
</div> | |
<div id="deviceBasicFunctions" class="device-functions"> | |
<h3>2. ๊ธฐ๋ณธ ๊ธฐ๋ฅ</h3> | |
<div class="function-buttons"> | |
<button id="checkDeviceStatusBtn">์ฅ์น ์ํ ํ์ธ</button> | |
</div> | |
<textarea id="deviceStatusResult" class="device-status-result" readonly></textarea> | |
</div> | |
<div id="deviceProgramControl" class="program-control"> | |
<h3>3. ํ๋ก๊ทธ๋จ ์คํ</h3> | |
<div class="function-buttons"> | |
<button id="getProgramsBtn">ํ๋ก๊ทธ๋จ ๋ชฉ๋ก ์๋ก๊ณ ์นจ</button> | |
</div> | |
<div id="programsList" class="program-list-container"> | |
<div class="no-programs-message">ํ๋ก๊ทธ๋จ ๋ชฉ๋ก์ด ์ฌ๊ธฐ์ ํ์๋ฉ๋๋ค.</div> | |
</div> | |
<div class="program-select-container"> | |
<select id="programSelectDropdown"> | |
<option value="">-- ๋ชฉ๋ก ์๋ก๊ณ ์นจ ํ ์ ํ --</option> | |
</select> | |
</div> | |
<button id="executeProgramBtn" class="execute-btn" disabled>์ ํํ ํ๋ก๊ทธ๋จ ์คํ</button> | |
<div id="executeResult" class="execute-result"></div> | |
</div> | |
<!-- ์ฌ์ฉ์ ์ ์ ํ๋ก๊ทธ๋จ ์คํ ์น์ ์ถ๊ฐ --> | |
<div id="deviceCustomControl" class="program-control"> | |
<h3>4. ์ฌ์ฉ์ ์ ์ ํ๋ก๊ทธ๋จ ์คํ</h3> | |
<div class="custom-command-container"> | |
<input type="text" id="customCommandInput" placeholder="์คํํ ๋ช ๋ น์ด ๋๋ ํ๋ก๊ทธ๋จ ๊ฒฝ๋ก ์ ๋ ฅ"> | |
<button id="executeCustomBtn">์คํ</button> | |
</div> | |
<div id="customExecuteResult" class="execute-result"></div> | |
</div> | |
</section> | |
</main> | |
<footer> | |
<p>ยฉ 2025 RAG ๊ฒ์ ์ฑ๋ด | OpenAI/DeepSeek LLM & VITO STT ํ์ฉ</p> | |
<div class="current-llm"> | |
<span>Current LLM: </span> | |
<span id="currentLLMInfo">-</span> | |
</div> | |
</footer> | |
</div> | |
<script src="{{ url_for('static', filename='js/app-core.js') }}"></script> | |
<script src="{{ url_for('static', filename='js/app-device.js') }}"></script> | |
<script src="{{ url_for('static', filename='js/app.js') }}"></script> | |
</body> | |
</html> | |