ldostadi commited on
Commit
b2ba210
Β·
verified Β·
1 Parent(s): cde891a

Upload index.html with huggingface_hub

Browse files
Files changed (1) hide show
  1. index.html +105 -19
index.html CHANGED
@@ -1,19 +1,105 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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>