Spaces:
Paused
Paused
Delete home.html
Browse files
home.html
DELETED
@@ -1,717 +0,0 @@
|
|
1 |
-
<!doctype html>
|
2 |
-
<html lang="en">
|
3 |
-
<head>
|
4 |
-
<!-- Required meta tags -->
|
5 |
-
<meta charset="utf-8" />
|
6 |
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
7 |
-
<!-- Bootstrap CSS -->
|
8 |
-
|
9 |
-
<link rel="icon" type="image" href="static\social_icons\favicon.png" />
|
10 |
-
<script src="static\dependencies\jquery\3.6.0\jquery.min.js"></script>
|
11 |
-
<script src="static\dependencies\bootstrap-5.1.3-dist\js\bootstrap.min.js"></script>
|
12 |
-
<link
|
13 |
-
rel="stylesheet"
|
14 |
-
href="static\dependencies\bootstrap-5.1.3-dist\css\bootstrap.min.css"
|
15 |
-
/>
|
16 |
-
|
17 |
-
<title>localGPT</title>
|
18 |
-
</head>
|
19 |
-
<script>
|
20 |
-
function openFileSelection() {
|
21 |
-
const fileInput = document.getElementById("fileInput");
|
22 |
-
fileInput.accept = ".csv, .pdf, .txt, .doc";
|
23 |
-
fileInput.click();
|
24 |
-
fileInput.addEventListener("change", handleFileSelection);
|
25 |
-
}
|
26 |
-
|
27 |
-
function handleFileSelection(event) {
|
28 |
-
// You can perform some checks on the files here if you want
|
29 |
-
// Open the modal after file selection
|
30 |
-
const uploadModal = new bootstrap.Modal(
|
31 |
-
document.getElementById("uploadModal"),
|
32 |
-
);
|
33 |
-
uploadModal.show();
|
34 |
-
}
|
35 |
-
|
36 |
-
function submitPromptForm() {
|
37 |
-
// Show the modal
|
38 |
-
$("#responseModal").modal("show");
|
39 |
-
|
40 |
-
// Submit the form after a short delay to allow the modal to open
|
41 |
-
setTimeout(function () {
|
42 |
-
document.getElementById("promptForm").submit();
|
43 |
-
}, 5);
|
44 |
-
}
|
45 |
-
|
46 |
-
function submitForm(action) {
|
47 |
-
var form = document.getElementById("uploadForm");
|
48 |
-
|
49 |
-
var input = document.createElement("input");
|
50 |
-
input.type = "hidden";
|
51 |
-
input.name = "action";
|
52 |
-
input.value = action;
|
53 |
-
|
54 |
-
form.appendChild(input);
|
55 |
-
|
56 |
-
// After the form is submitted, close the current modal and open the new one.
|
57 |
-
$("#uploadModal").on("hidden.bs.modal", function () {
|
58 |
-
$("#ingesting-modal").modal("show");
|
59 |
-
});
|
60 |
-
|
61 |
-
if (action == "add" || action == "reset") {
|
62 |
-
$("#uploadModal").modal("hide");
|
63 |
-
}
|
64 |
-
|
65 |
-
form.submit();
|
66 |
-
}
|
67 |
-
</script>
|
68 |
-
{% if show_response_modal %}
|
69 |
-
<script>
|
70 |
-
$(document).ready(function () {
|
71 |
-
$("#response_modal").modal("show");
|
72 |
-
});
|
73 |
-
</script>
|
74 |
-
{% endif %}
|
75 |
-
<style>
|
76 |
-
|
77 |
-
@import url('https://fonts.googleapis.com/css2?family=Play:wght@400;700&display=swap');
|
78 |
-
|
79 |
-
body {
|
80 |
-
background-image: linear-gradient(90deg, #09203f, #0057ff);
|
81 |
-
height: 100vh;
|
82 |
-
display: flex;
|
83 |
-
justify-content: center;
|
84 |
-
align-items: center;
|
85 |
-
}
|
86 |
-
|
87 |
-
.container{
|
88 |
-
padding: 15px;
|
89 |
-
display: flex;
|
90 |
-
flex-direction: column;
|
91 |
-
justify-content: center;
|
92 |
-
align-items: center;
|
93 |
-
max-width: 1000px;
|
94 |
-
margin: 0 auto;
|
95 |
-
}
|
96 |
-
|
97 |
-
.titlegpt{
|
98 |
-
font-size: 9vw;
|
99 |
-
color: white;
|
100 |
-
font-family: 'Play', sans-serif;
|
101 |
-
}
|
102 |
-
|
103 |
-
.search {
|
104 |
-
width: 100%;
|
105 |
-
box-shadow:
|
106 |
-
inset 0 1px 1px rgba(0, 0, 0, 0.075),
|
107 |
-
0 0 8px rgba(255, 0, 0, 0.6);
|
108 |
-
background-color: #fff;
|
109 |
-
padding: 4px;
|
110 |
-
border-radius: 5px;
|
111 |
-
}
|
112 |
-
|
113 |
-
::placeholder {
|
114 |
-
color: rgb(110, 104, 104);
|
115 |
-
opacity: 1;
|
116 |
-
}
|
117 |
-
|
118 |
-
.search-2 {
|
119 |
-
position: relative;
|
120 |
-
width: 100%;
|
121 |
-
}
|
122 |
-
|
123 |
-
.search-2 input {
|
124 |
-
height: 45px;
|
125 |
-
border: none;
|
126 |
-
width: 100%;
|
127 |
-
padding-left: 100px;
|
128 |
-
padding-right: 200px;
|
129 |
-
}
|
130 |
-
|
131 |
-
.search-2 input:focus {
|
132 |
-
border-color: none;
|
133 |
-
box-shadow: none;
|
134 |
-
outline: none;
|
135 |
-
}
|
136 |
-
|
137 |
-
.search-2 i {
|
138 |
-
position: absolute;
|
139 |
-
top: 12px;
|
140 |
-
left: -10px;
|
141 |
-
font-size: 24px;
|
142 |
-
color: #eee;
|
143 |
-
}
|
144 |
-
|
145 |
-
.search-2 button {
|
146 |
-
position: absolute;
|
147 |
-
right: 100px;
|
148 |
-
top: 0px;
|
149 |
-
border: none;
|
150 |
-
height: 45px;
|
151 |
-
background-color: #ff0059;
|
152 |
-
color: #fff;
|
153 |
-
width: 90px;
|
154 |
-
border-radius: 4px;
|
155 |
-
}
|
156 |
-
|
157 |
-
.search-2 button:hover {
|
158 |
-
background: #ff0059;
|
159 |
-
color: #ffffff;
|
160 |
-
transition: all 0.2s ease;
|
161 |
-
cursor: pointer;
|
162 |
-
}
|
163 |
-
|
164 |
-
.search-2 .upload_button {
|
165 |
-
position: absolute;
|
166 |
-
right: 1px;
|
167 |
-
top: 0px;
|
168 |
-
border: none;
|
169 |
-
height: 45px;
|
170 |
-
background-color: #ff0059;
|
171 |
-
color: #fff;
|
172 |
-
width: 90px;
|
173 |
-
border-radius: 4px;
|
174 |
-
}
|
175 |
-
|
176 |
-
.cancel_button {
|
177 |
-
border: none;
|
178 |
-
height: 45px;
|
179 |
-
background-color: gray;
|
180 |
-
color: #fff;
|
181 |
-
width: 90px;
|
182 |
-
border-radius: 4px;
|
183 |
-
}
|
184 |
-
|
185 |
-
.cancel_button:hover {
|
186 |
-
background: rgb(114, 113, 113);
|
187 |
-
color: #ffffff;
|
188 |
-
transition: all 0.2s ease;
|
189 |
-
cursor: pointer;
|
190 |
-
}
|
191 |
-
|
192 |
-
.default_button {
|
193 |
-
border: none;
|
194 |
-
height: 45px;
|
195 |
-
background-color: #ff0059;
|
196 |
-
color: #fff;
|
197 |
-
width: 90px;
|
198 |
-
border-radius: 4px;
|
199 |
-
}
|
200 |
-
|
201 |
-
.default_button:hover {
|
202 |
-
background: #ff0059;
|
203 |
-
color: #ffffff;
|
204 |
-
transition: all 0.2s ease;
|
205 |
-
cursor: pointer;
|
206 |
-
}
|
207 |
-
|
208 |
-
.upload_button:hover {
|
209 |
-
background: #ff0059;
|
210 |
-
color: #ffffff;
|
211 |
-
transition: all 0.2s ease;
|
212 |
-
cursor: pointer;
|
213 |
-
}
|
214 |
-
|
215 |
-
.search-2 .tutorial_button {
|
216 |
-
position: absolute;
|
217 |
-
left: 1px;
|
218 |
-
top: 0px;
|
219 |
-
border: none;
|
220 |
-
height: 45px;
|
221 |
-
background-color: #ff0059;
|
222 |
-
color: #fff;
|
223 |
-
width: 90px;
|
224 |
-
border-radius: 4px;
|
225 |
-
}
|
226 |
-
|
227 |
-
.tutorial_button:hover {
|
228 |
-
background: #ff0059;
|
229 |
-
color: #ffffff;
|
230 |
-
transition: all 0.2s ease;
|
231 |
-
cursor: pointer;
|
232 |
-
}
|
233 |
-
|
234 |
-
.form-control:focus {
|
235 |
-
border-color: #bc13cf;
|
236 |
-
box-shadow:
|
237 |
-
inset 0 1px 1px rgba(0, 0, 0, 0.075),
|
238 |
-
0 0 8px rgba(255, 0, 0, 0.6);
|
239 |
-
}
|
240 |
-
|
241 |
-
@media (max-width: 800px) {
|
242 |
-
.search-2 i {
|
243 |
-
left: 4px;
|
244 |
-
}
|
245 |
-
|
246 |
-
.search-2 input {
|
247 |
-
padding-left: 34px;
|
248 |
-
}
|
249 |
-
|
250 |
-
.search-2 button {
|
251 |
-
height: 37px;
|
252 |
-
top: 5px;
|
253 |
-
}
|
254 |
-
|
255 |
-
.search-2 .tutorial_button {
|
256 |
-
height: 37px;
|
257 |
-
top: 5px;
|
258 |
-
}
|
259 |
-
|
260 |
-
.search-2 .upload_button {
|
261 |
-
height: 37px;
|
262 |
-
top: 5px;
|
263 |
-
}
|
264 |
-
|
265 |
-
.search-2 input {
|
266 |
-
height: 45px;
|
267 |
-
border: none;
|
268 |
-
width: 100%;
|
269 |
-
padding-left: 100px;
|
270 |
-
padding-right: 200px;
|
271 |
-
}
|
272 |
-
|
273 |
-
.default_button {
|
274 |
-
height: 37px;
|
275 |
-
}
|
276 |
-
|
277 |
-
.cancel_button {
|
278 |
-
height: 37px;
|
279 |
-
}
|
280 |
-
}
|
281 |
-
|
282 |
-
.accordion-button:focus {
|
283 |
-
z-index: 3;
|
284 |
-
border-color: #ff0059;
|
285 |
-
box-shadow: 0 0 0 0.25rem rgba(153, 50, 168, 0.25);
|
286 |
-
}
|
287 |
-
|
288 |
-
.accordion-button:not(.collapsed) {
|
289 |
-
color:#ff0059;
|
290 |
-
background-color: #f5b3cb;
|
291 |
-
box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.125);
|
292 |
-
}
|
293 |
-
</style>
|
294 |
-
<body>
|
295 |
-
<div class="container">
|
296 |
-
<div class="titlegpt">LocalGPT</div>
|
297 |
-
<div class="search">
|
298 |
-
<div class="row">
|
299 |
-
<div class="col-md-12">
|
300 |
-
<div class="search-2">
|
301 |
-
<form
|
302 |
-
id="promptForm"
|
303 |
-
action="{{ url_for('home_page') }}"
|
304 |
-
method="POST"
|
305 |
-
>
|
306 |
-
<button
|
307 |
-
type="button"
|
308 |
-
class="tutorial_button"
|
309 |
-
data-bs-toggle="modal"
|
310 |
-
data-bs-target="#tutorial_modal"
|
311 |
-
>
|
312 |
-
Tutorial
|
313 |
-
</button>
|
314 |
-
<i class="bx bxs-map"></i>
|
315 |
-
<input
|
316 |
-
type="text"
|
317 |
-
name="user_prompt"
|
318 |
-
id="searchInput"
|
319 |
-
placeholder="Tell a summary of what you want to know?"
|
320 |
-
/>
|
321 |
-
<button type="button" onclick="submitPromptForm()">
|
322 |
-
Search
|
323 |
-
</button>
|
324 |
-
</form>
|
325 |
-
<form
|
326 |
-
id="uploadForm"
|
327 |
-
action="{{ url_for('home_page') }}"
|
328 |
-
method="POST"
|
329 |
-
enctype="multipart/form-data"
|
330 |
-
>
|
331 |
-
<input
|
332 |
-
type="file"
|
333 |
-
name="documents"
|
334 |
-
id="fileInput"
|
335 |
-
style="display: none"
|
336 |
-
multiple
|
337 |
-
/>
|
338 |
-
<button
|
339 |
-
type="button"
|
340 |
-
class="upload_button"
|
341 |
-
onclick="openFileSelection()"
|
342 |
-
>
|
343 |
-
Upload
|
344 |
-
</button>
|
345 |
-
</form>
|
346 |
-
</div>
|
347 |
-
</div>
|
348 |
-
</div>
|
349 |
-
</div>
|
350 |
-
</div>
|
351 |
-
|
352 |
-
<!-- For some reason the script needs to go here to make the the enter key also trigger the generating response modal -->
|
353 |
-
<script>
|
354 |
-
document
|
355 |
-
.getElementById("searchInput")
|
356 |
-
.addEventListener("keydown", function (event) {
|
357 |
-
if (event.keyCode === 13) {
|
358 |
-
event.preventDefault(); // Prevent form submission
|
359 |
-
submitPromptForm(); // Call the function to show the modal
|
360 |
-
}
|
361 |
-
});
|
362 |
-
</script>
|
363 |
-
|
364 |
-
<!-- Chat Response Modal -->
|
365 |
-
<div
|
366 |
-
class="modal fade"
|
367 |
-
id="response_modal"
|
368 |
-
tabindex="-1"
|
369 |
-
aria-labelledby="response_modal"
|
370 |
-
aria-hidden="true"
|
371 |
-
>
|
372 |
-
<div class="modal-dialog modal-xl modal-dialog-centered">
|
373 |
-
<div class="modal-content">
|
374 |
-
<div class="modal-header text-center">
|
375 |
-
<h5
|
376 |
-
class="modal-title w-100"
|
377 |
-
id="response_modal"
|
378 |
-
style="color: #292b2c"
|
379 |
-
>
|
380 |
-
Response
|
381 |
-
</h5>
|
382 |
-
</div>
|
383 |
-
<div class="modal-body text-center" style="color: #292b2c">
|
384 |
-
<strong>Search</strong>
|
385 |
-
<br />
|
386 |
-
<p>{{response_dict['Prompt']}}</p>
|
387 |
-
|
388 |
-
<strong>Answer</strong>
|
389 |
-
<br />
|
390 |
-
<p style="margin-left: 5%; margin-right: 5%">
|
391 |
-
{{response_dict['Answer']}}
|
392 |
-
</p>
|
393 |
-
|
394 |
-
<strong>Sources</strong>
|
395 |
-
<div
|
396 |
-
class="accordion"
|
397 |
-
id="accordionExample"
|
398 |
-
style="margin-top: 10px"
|
399 |
-
>
|
400 |
-
{% for item in response_dict['Sources'] %}
|
401 |
-
<div class="accordion-item">
|
402 |
-
<h2
|
403 |
-
class="accordion-header text-center"
|
404 |
-
id="heading{{ loop.index0 }}"
|
405 |
-
>
|
406 |
-
<button
|
407 |
-
class="accordion-button d-block text-center"
|
408 |
-
type="button"
|
409 |
-
data-bs-toggle="collapse"
|
410 |
-
data-bs-target="#collapse{{ loop.index0 }}"
|
411 |
-
aria-expanded="true"
|
412 |
-
aria-controls="collapse{{ loop.index0 }}"
|
413 |
-
>
|
414 |
-
{{ item[0] }}
|
415 |
-
<!-- Source -->
|
416 |
-
</button>
|
417 |
-
</h2>
|
418 |
-
<div
|
419 |
-
id="collapse{{ loop.index0 }}"
|
420 |
-
class="accordion-collapse collapse {% if loop.first %}show{% endif %}"
|
421 |
-
aria-labelledby="heading{{ loop.index0 }}"
|
422 |
-
data-bs-parent="#accordionExample"
|
423 |
-
>
|
424 |
-
<div
|
425 |
-
class="accordion-body"
|
426 |
-
style="
|
427 |
-
text-align: justify;
|
428 |
-
margin-left: 5%;
|
429 |
-
margin-right: 5%;
|
430 |
-
"
|
431 |
-
>
|
432 |
-
{{ item[1] }}
|
433 |
-
<!-- Content -->
|
434 |
-
</div>
|
435 |
-
</div>
|
436 |
-
</div>
|
437 |
-
{% endfor %}
|
438 |
-
</div>
|
439 |
-
</div>
|
440 |
-
<div class="modal-footer">
|
441 |
-
<button
|
442 |
-
type="button"
|
443 |
-
class="default_button"
|
444 |
-
data-bs-dismiss="modal"
|
445 |
-
>
|
446 |
-
Close
|
447 |
-
</button>
|
448 |
-
</div>
|
449 |
-
</div>
|
450 |
-
</div>
|
451 |
-
</div>
|
452 |
-
|
453 |
-
<!-- Generating Response Modal -->
|
454 |
-
<div
|
455 |
-
class="modal fade"
|
456 |
-
id="responseModal"
|
457 |
-
tabindex="-1"
|
458 |
-
aria-labelledby="responseModalLabel"
|
459 |
-
aria-hidden="true"
|
460 |
-
data-bs-backdrop="static"
|
461 |
-
data-bs-keyboard="false"
|
462 |
-
>
|
463 |
-
<div class="modal-dialog modal-dialog-centered">
|
464 |
-
<div class="modal-content">
|
465 |
-
<div class="modal-header justify-content-center">
|
466 |
-
<h5
|
467 |
-
class="modal-title justify-content-center"
|
468 |
-
id="responseModalLabel"
|
469 |
-
>
|
470 |
-
Generating Response
|
471 |
-
</h5>
|
472 |
-
</div>
|
473 |
-
<div class="modal-body text-center">
|
474 |
-
<p>Please wait...</p>
|
475 |
-
</div>
|
476 |
-
</div>
|
477 |
-
</div>
|
478 |
-
</div>
|
479 |
-
|
480 |
-
<!-- Upload Confirmation Modal -->
|
481 |
-
<div
|
482 |
-
class="modal fade"
|
483 |
-
id="uploadModal"
|
484 |
-
tabindex="-1"
|
485 |
-
aria-labelledby="uploadModalLabel"
|
486 |
-
aria-hidden="true"
|
487 |
-
>
|
488 |
-
<div class="modal-dialog modal-dialog-centered">
|
489 |
-
<div class="modal-content">
|
490 |
-
<div class="modal-header justify-content-center">
|
491 |
-
<h5
|
492 |
-
class="modal-title justify-content-center"
|
493 |
-
id="uploadModalLabel"
|
494 |
-
>
|
495 |
-
File Upload Confirmation
|
496 |
-
</h5>
|
497 |
-
</div>
|
498 |
-
<div class="modal-body margin-left: 5%; text-align: left;">
|
499 |
-
<ul>
|
500 |
-
<li>
|
501 |
-
Click
|
502 |
-
<span style="background-color: #ff0059; color: white">Add</span> if
|
503 |
-
you want to add the documents selected to your pre-existing
|
504 |
-
knowledge base.
|
505 |
-
</li>
|
506 |
-
<br />
|
507 |
-
<li>
|
508 |
-
Click
|
509 |
-
<span style="background-color: #ff0059; color: white">Reset</span>
|
510 |
-
if you want to reset your knowledge base, and then use your new
|
511 |
-
documents as your new knowledge base.
|
512 |
-
</li>
|
513 |
-
<br />
|
514 |
-
<li>
|
515 |
-
Click
|
516 |
-
<span style="background-color: gray; color: white">Cancel</span>
|
517 |
-
if you don't want to make any changes.
|
518 |
-
</li>
|
519 |
-
</ul>
|
520 |
-
</div>
|
521 |
-
<div class="modal-footer justify-content-center">
|
522 |
-
<button
|
523 |
-
type="submit"
|
524 |
-
name="button_clicked"
|
525 |
-
value="add_document"
|
526 |
-
class="default_button"
|
527 |
-
onclick="submitForm('add')"
|
528 |
-
>
|
529 |
-
Add
|
530 |
-
</button>
|
531 |
-
<button
|
532 |
-
type="submit"
|
533 |
-
name="button_clicked"
|
534 |
-
value="reset_document"
|
535 |
-
class="default_button"
|
536 |
-
onclick="submitForm('reset')"
|
537 |
-
>
|
538 |
-
Reset
|
539 |
-
</button>
|
540 |
-
<button type="button" class="cancel_button" data-bs-dismiss="modal">
|
541 |
-
Cancel
|
542 |
-
</button>
|
543 |
-
</div>
|
544 |
-
</div>
|
545 |
-
</div>
|
546 |
-
</div>
|
547 |
-
|
548 |
-
<!-- Ingesting Documents Modal -->
|
549 |
-
<div
|
550 |
-
class="modal fade"
|
551 |
-
id="ingesting-modal"
|
552 |
-
tabindex="-1"
|
553 |
-
role="dialog"
|
554 |
-
data-bs-backdrop="static"
|
555 |
-
data-bs-keyboard="false"
|
556 |
-
>
|
557 |
-
<div class="modal-dialog modal-dialog-centered" role="document">
|
558 |
-
<div class="modal-content">
|
559 |
-
<div class="modal-header justify-content-center">
|
560 |
-
<h5 class="modal-title">Ingesting Documents...</h5>
|
561 |
-
</div>
|
562 |
-
<div class="modal-body text-center">
|
563 |
-
<p>Please wait while we ingest the documents.</p>
|
564 |
-
</div>
|
565 |
-
</div>
|
566 |
-
</div>
|
567 |
-
</div>
|
568 |
-
|
569 |
-
<!-- Tutorial Modal -->
|
570 |
-
<div
|
571 |
-
class="modal fade"
|
572 |
-
id="tutorial_modal"
|
573 |
-
tabindex="-1"
|
574 |
-
aria-labelledby="tutorial_modal"
|
575 |
-
aria-hidden="true"
|
576 |
-
>
|
577 |
-
<div class="modal-dialog modal-xl modal-dialog-centered">
|
578 |
-
<div class="modal-content">
|
579 |
-
<div class="modal-header text-center">
|
580 |
-
<h5
|
581 |
-
class="modal-title w-100"
|
582 |
-
id="tutorial_modal"
|
583 |
-
style="color: #292b2c"
|
584 |
-
>
|
585 |
-
Tutorial
|
586 |
-
</h5>
|
587 |
-
</div>
|
588 |
-
<div class="modal-body" style="color: #292b2c">
|
589 |
-
<strong style="margin-left: 5%; text-align: left">About</strong>
|
590 |
-
<br />
|
591 |
-
<p style="text-align: justify; margin-left: 5%; margin-right: 5%">
|
592 |
-
Introducing a cutting-edge application that empowers users to
|
593 |
-
leverage the capabilities of a language model, even in the absence
|
594 |
-
of an internet connection. This advanced tool serves as an
|
595 |
-
indispensable resource for accessing information beyond the
|
596 |
-
confines of traditional language model tools such as chatGPT.
|
597 |
-
<br /><br />
|
598 |
-
One of the key advantages of this application is the preservation
|
599 |
-
of data control. This feature becomes particularly valuable when
|
600 |
-
handling sensitive data that must remain within the confines of an
|
601 |
-
organization or personal documents that warrant utmost
|
602 |
-
confidentiality, eliminating the need to transmit information
|
603 |
-
through third-party channels.
|
604 |
-
<br /><br />
|
605 |
-
Seamlessly integrating personal documents into the system is
|
606 |
-
effortless, ensuring a smooth user experience. Whether in the form
|
607 |
-
of text, PDF, CSV, or Excel files, users can conveniently provide
|
608 |
-
the desired information for inquiry. The application swiftly
|
609 |
-
processes these documents, effectively creating a comprehensive
|
610 |
-
database for the model to leverage, enabling accurate and
|
611 |
-
insightful responses.
|
612 |
-
<br /><br />
|
613 |
-
A notable benefit of this approach lies in its efficient resource
|
614 |
-
utilization. Unlike the resource-intensive retraining processes
|
615 |
-
employed by alternative methods, the ingestion of documents within
|
616 |
-
this application demands significantly less compute power. This
|
617 |
-
efficiency optimization allows for a streamlined user experience,
|
618 |
-
saving both time and computational resources.
|
619 |
-
<br /><br />
|
620 |
-
Discover the unparalleled capabilities of this technical marvel,
|
621 |
-
as it enables users to tap into the full potential of language
|
622 |
-
models, all while operating offline. Experience a new era of
|
623 |
-
information access, bolstering productivity and expanding
|
624 |
-
possibilities. Embrace this powerful tool and unlock the true
|
625 |
-
potential of your data today.
|
626 |
-
</p>
|
627 |
-
<strong style="margin-left: 5%; text-align: left"
|
628 |
-
>Upload Documents</strong
|
629 |
-
>
|
630 |
-
<br />
|
631 |
-
<p
|
632 |
-
style="
|
633 |
-
line-height: 1.75;
|
634 |
-
margin-left: 5%;
|
635 |
-
margin-right: 5%;
|
636 |
-
text-align: left;
|
637 |
-
"
|
638 |
-
>
|
639 |
-
1. To upload documents for the app to ingest as its new knowledge
|
640 |
-
base click the
|
641 |
-
<span style="background-color: #ff0059; color: white">Upload</span>
|
642 |
-
button.
|
643 |
-
<br />
|
644 |
-
2. Select the documents you want to serve as your new knowledge
|
645 |
-
base to converse with.
|
646 |
-
<br />
|
647 |
-
3. Then you will be prompted with a confirmation to either
|
648 |
-
<span style="background-color: #ff0059; color: white">Add</span> the
|
649 |
-
documents to your knowledge base,
|
650 |
-
<span style="background-color: #ff0059; color: white">Reset</span>
|
651 |
-
your knowledge base with the documents you just selected, or
|
652 |
-
<span style="background-color: gray; color: white">Cancel</span>
|
653 |
-
the upload.
|
654 |
-
<br />
|
655 |
-
4. There will be a short wait time as the documents get ingested
|
656 |
-
into the vector database as your new knowledge base.
|
657 |
-
</p>
|
658 |
-
<a
|
659 |
-
href="static/document_examples/constitution.pdf"
|
660 |
-
style="margin-left: 5%"
|
661 |
-
download
|
662 |
-
>
|
663 |
-
<button class="default_button" style="width: auto">
|
664 |
-
Example Constitution
|
665 |
-
</button>
|
666 |
-
</a>
|
667 |
-
<a href="static/document_examples/news_articles.zip" download>
|
668 |
-
<button class="default_button" style="width: auto">
|
669 |
-
Example News Articles
|
670 |
-
</button>
|
671 |
-
</a>
|
672 |
-
|
673 |
-
<br />
|
674 |
-
<br />
|
675 |
-
<strong style="margin-left: 5%; text-align: left">Searching</strong>
|
676 |
-
<p
|
677 |
-
style="
|
678 |
-
line-height: 1.75;
|
679 |
-
margin-left: 5%;
|
680 |
-
margin-right: 5%;
|
681 |
-
text-align: left;
|
682 |
-
"
|
683 |
-
>
|
684 |
-
1. In order to ask a question, type a question into the search bar
|
685 |
-
like:
|
686 |
-
<br />
|
687 |
-
2.
|
688 |
-
<span style="background-color: gray; color: white"
|
689 |
-
>Give me a summary of the documents</span
|
690 |
-
>
|
691 |
-
<br />
|
692 |
-
3. Hit enter on your keyboard or click
|
693 |
-
<span style="background-color: #ff0059; color: white">Search</span>
|
694 |
-
<br />
|
695 |
-
4. Wait while the LLM model consumes the prompt and prepares the
|
696 |
-
answer.
|
697 |
-
<br />
|
698 |
-
5. Once done, it will print the answer and the 4 sources it used
|
699 |
-
as context from your documents; you can then ask another question
|
700 |
-
without re-running the script, just wait for the prompt again.
|
701 |
-
</p>
|
702 |
-
<br />
|
703 |
-
</div>
|
704 |
-
<div class="modal-footer justify-content-center">
|
705 |
-
<button
|
706 |
-
type="button"
|
707 |
-
class="default_button"
|
708 |
-
data-bs-dismiss="modal"
|
709 |
-
>
|
710 |
-
Close
|
711 |
-
</button>
|
712 |
-
</div>
|
713 |
-
</div>
|
714 |
-
</div>
|
715 |
-
</div>
|
716 |
-
</body>
|
717 |
-
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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