Spaces:
Running
Running
Upload index.html with huggingface_hub
Browse files- index.html +105 -19
index.html
CHANGED
|
@@ -1,19 +1,105 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>RAG Axiom Extractor - Logical Document Generation</title>
|
| 7 |
+
<link rel="stylesheet" href="style.css">
|
| 8 |
+
</head>
|
| 9 |
+
<body>
|
| 10 |
+
<header>
|
| 11 |
+
<h1>π RAG Axiom Extractor & Generator</h1>
|
| 12 |
+
<p>Extract axioms from documents and generate logically consistent responses</p>
|
| 13 |
+
<div class="attribution">
|
| 14 |
+
<a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank">Built with anycoder</a>
|
| 15 |
+
</div>
|
| 16 |
+
</header>
|
| 17 |
+
|
| 18 |
+
<main>
|
| 19 |
+
<section class="model-status">
|
| 20 |
+
<h2>Model Status</h2>
|
| 21 |
+
<div id="statusContainer">
|
| 22 |
+
<div class="status-item">
|
| 23 |
+
<span>Embedding Model:</span>
|
| 24 |
+
<span id="embeddingStatus" class="status pending">β³ Loading...</span>
|
| 25 |
+
</div>
|
| 26 |
+
<div class="status-item">
|
| 27 |
+
<span>Generation Model:</span>
|
| 28 |
+
<span id="generationStatus" class="status pending">β³ Loading...</span>
|
| 29 |
+
</div>
|
| 30 |
+
</div>
|
| 31 |
+
<div id="progressContainer" class="progress-container hidden">
|
| 32 |
+
<div id="progressBar" class="progress-bar"></div>
|
| 33 |
+
<span id="progressText">0%</span>
|
| 34 |
+
</div>
|
| 35 |
+
</section>
|
| 36 |
+
|
| 37 |
+
<section class="upload-section">
|
| 38 |
+
<h2>π Document Upload</h2>
|
| 39 |
+
<div class="upload-area" id="uploadArea">
|
| 40 |
+
<input type="file" id="fileInput" accept=".txt,.md,.doc,.docx,.pdf" multiple>
|
| 41 |
+
<label for="fileInput" class="upload-label">
|
| 42 |
+
<span>π Choose files or drag & drop</span>
|
| 43 |
+
<small>Supports: TXT, MD, DOC, DOCX, PDF</small>
|
| 44 |
+
</label>
|
| 45 |
+
</div>
|
| 46 |
+
<div id="uploadStatus"></div>
|
| 47 |
+
</section>
|
| 48 |
+
|
| 49 |
+
<section class="content-grid">
|
| 50 |
+
<div class="panel">
|
| 51 |
+
<h2>π Indexed Documents</h2>
|
| 52 |
+
<div id="documentList" class="document-list">
|
| 53 |
+
<p class="empty-state">No documents indexed yet. Upload files to begin.</p>
|
| 54 |
+
</div>
|
| 55 |
+
</div>
|
| 56 |
+
|
| 57 |
+
<div class="panel">
|
| 58 |
+
<h2>β‘ Extracted Axioms</h2>
|
| 59 |
+
<div id="axiomList" class="axiom-list">
|
| 60 |
+
<p class="empty-state">No axioms extracted yet. Upload and index documents to extract axioms.</p>
|
| 61 |
+
</div>
|
| 62 |
+
</div>
|
| 63 |
+
</section>
|
| 64 |
+
|
| 65 |
+
<section class="generation-section">
|
| 66 |
+
<h2>π€ Generate Response</h2>
|
| 67 |
+
<div class="generation-controls">
|
| 68 |
+
<textarea
|
| 69 |
+
id="queryInput"
|
| 70 |
+
placeholder="Enter your query (e.g., 'What are the fundamental principles of quantum mechanics based on the uploaded documents?')"
|
| 71 |
+
rows="4"
|
| 72 |
+
></textarea>
|
| 73 |
+
<div class="generation-options">
|
| 74 |
+
<label>
|
| 75 |
+
<input type="checkbox" id="useAxioms" checked>
|
| 76 |
+
Use extracted axioms for logical consistency
|
| 77 |
+
</label>
|
| 78 |
+
<label>
|
| 79 |
+
<input type="checkbox" id="useContext" checked>
|
| 80 |
+
Use document context (RAG)
|
| 81 |
+
</label>
|
| 82 |
+
</div>
|
| 83 |
+
<button id="generateBtn" disabled>Generate Response</button>
|
| 84 |
+
</div>
|
| 85 |
+
<div id="generationStatusIndicator"></div>
|
| 86 |
+
<div id="generationResult" class="result-container hidden">
|
| 87 |
+
<h3>Generated Response:</h3>
|
| 88 |
+
<div id="responseText" class="response-text"></div>
|
| 89 |
+
<details class="context-info">
|
| 90 |
+
<summary>View Retrieved Context</summary>
|
| 91 |
+
<div id="retrievedContext"></div>
|
| 92 |
+
</details>
|
| 93 |
+
</div>
|
| 94 |
+
</section>
|
| 95 |
+
|
| 96 |
+
<section class="actions">
|
| 97 |
+
<button id="clearAllBtn" class="danger">Clear All Data</button>
|
| 98 |
+
<button id="exportBtn">Export Axioms</button>
|
| 99 |
+
</section>
|
| 100 |
+
</main>
|
| 101 |
+
|
| 102 |
+
<script src="https://cdn.jsdelivr.net/npm/@huggingface/transformers@3.0.0-alpha.14"></script>
|
| 103 |
+
<script src="index.js"></script>
|
| 104 |
+
</body>
|
| 105 |
+
</html>
|