Geraldine commited on
Commit
aaf15a2
·
verified ·
1 Parent(s): bc26bd1

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +90 -18
index.html CHANGED
@@ -1,19 +1,91 @@
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>EAD/XML Editor</title>
7
+ <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
8
+ <link rel="stylesheet" href="./style.css">
9
+ <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
10
+ <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.bundle.min.js"></script>
11
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.14/ace.js"></script>
12
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.14/ext-beautify.js"></script>
13
+ </head>
14
+ <body>
15
+ <div class="container mt-4">
16
+ <h2 class="text-center">AI-generated EAD/XML records with Speech-to-text command</h2>
17
+ <!-- Whisper loading -->
18
+ <div class="text-center" id="loadingSpinner" style="display: none;">
19
+ <div class="spinner-border" role="status">
20
+ <span class="sr-only">Loading...</span>
21
+ </div>
22
+ <p>Loading Whisper model, please wait...</p>
23
+ </div>
24
+ <!-- Collapsible Documentation Section -->
25
+ <div>
26
+ <button class="btn btn-info" data-toggle="collapse" data-target="#documentation" aria-expanded="false" aria-controls="documentation">
27
+ Toggle Documentation
28
+ </button>
29
+ <button class="btn btn-info" data-toggle="collapse" data-target="#browserRequirements" aria-expanded="false" aria-controls="browserRequirements">
30
+ Browser Requirements (WebGPU)
31
+ </button>
32
+ <div class="collapse" id="documentation">
33
+ <div class="card card-body mt-2">
34
+ <h5>Documentation</h5>
35
+ <p>This application allows users to generate EAD/XML records using voice commands.
36
+ Users can record their instructions, highlight existing XML content to add context,
37
+ and send the combined prompt to the Ollama model for processing.</p>
38
+ <p>To use the application:</p>
39
+ <ul>
40
+ <li>Click "Start Recording" to begin capturing your voice instructions (can be in french).</li>
41
+ <li>Highlight any existing XML content and click "Add to Context" to include it in your prompt.</li>
42
+ <li>Use the "Prettify XML" button to format your XML content.</li>
43
+ <li>Click "Send Prompt" to generate the EAD/XML based on your instructions.</li>
44
+ </ul>
45
+ <p>This application utilizes the <a href="https://huggingface.co/Xenova/whisper-small" target="_blanck"><strong>Xenova/whisper-small</strong></a> model for audio transcription, which is implemented using <a href="https://huggingface.co/docs/transformers.js/index" target="_blanck"><strong>transformers.js</strong></a> and leverages <strong>WebGPU</strong> in the browser for efficient processing.</p>
46
+ <p>For EAD generation, the application uses the <a href="https://huggingface.co/Geraldine/FineLlama-3.2-3B-Instruct-ead-GGUF" target="_blanck">Q5_K_M</a> quantized variant of the fine-tuned model <a href="https://huggingface.co/Geraldine/FineLlama-3.2-3B-Instruct-ead" target="_blanck"><strong>Geraldine/FineLlama-3.2-3B-Instruct-ead</strong></a>. This model is designed to understand and generate EAD/XML records based on the user’s instructions and context.</p>
47
+ <p>See this post for explanations on fine-tuning</p>
48
+ </div>
49
+ </div>
50
+
51
+ <div class="collapse" id="browserRequirements">
52
+ <div class="card card-body mt-2">
53
+ <h5>Browser Requirements for WebGPU</h5>
54
+ <p>To use the WebGPU features of this application, ensure that you are using a compatible browser. The following requirements must be met:</p>
55
+ <ul>
56
+ <li>Use a browser that supports WebGPU, such as the latest versions of:</li>
57
+ <ul>
58
+ <li><a href="https://www.google.com/chrome/" target="_blank">Google Chrome</a></li>
59
+ <li><a href="https://www.mozilla.org/en-US/firefox/new/" target="_blank">Mozilla Firefox</a></li>
60
+ <li><a href="https://www.microsoft.com/en-us/edge" target="_blank">Microsoft Edge</a></li>
61
+ </ul>
62
+ <li>Ensure that <a href="https://caniuse.com/webgpu" target="_blanck">WebGPU is enabled</a> in your browser settings.</li>
63
+ <li>Check for any experimental features that may need to be enabled for WebGPU support.</li>
64
+ </ul>
65
+ </div>
66
+ </div>
67
+ </div>
68
+ <hr>
69
+
70
+ <div class="controls mb-3">
71
+ <button id="startRecording" class="btn btn-primary">Start Recording</button>
72
+ <button id="stopRecording" class="btn btn-danger" disabled>Stop Recording</button>
73
+ <button id="prettifyXML" class="btn btn-secondary">Prettify XML</button>
74
+ <button id="sendPrompt" class="btn btn-success">Send Prompt</button>
75
+ <div id="status" class="status mt-2"></div>
76
+ </div>
77
+ <div class="row">
78
+ <div class="col-md-6">
79
+ <h3>User Prompt</h3>
80
+ <textarea id="transcription" class="form-control" rows="5" placeholder="Transcription will appear here..."></textarea>
81
+ </div>
82
+ <div class="col-md-6">
83
+ <h3>Context</h3>
84
+ <div id="context" class="border p-2" style="height: 200px; overflow-y: auto;"></div>
85
+ </div>
86
+ </div>
87
+ <div id="editor" class="editor mt-4"></div>
88
+ </div>
89
+ <script type="module" src="./main.js"></script>
90
+ </body>
91
  </html>