Spaces:
Runtime error
Runtime error
Commit
•
3ba239b
1
Parent(s):
27b9e27
Pushing details and using magenta
Browse files- templates/template_html.j2 +13 -43
templates/template_html.j2
CHANGED
@@ -1,60 +1,30 @@
|
|
|
|
|
|
1 |
<b>Instructions</b>:
|
2 |
-
<span style="color:
|
3 |
|
4 |
<b>Context</b>:
|
5 |
{% for doc in documents %}
|
6 |
-
<
|
7 |
-
<
|
8 |
-
|
9 |
-
|
10 |
-
|
|
|
11 |
{% endfor %}
|
12 |
<b>Query</b>: <span style="color: yellow;">{{ query }}</span>
|
13 |
|
14 |
<style>
|
15 |
.doc-box {
|
16 |
-
border: 2px solid #aaa;
|
17 |
padding: 10px;
|
18 |
margin-top: 10px;
|
19 |
-
border-radius: 5px;
|
20 |
background-color: #1E90FF;
|
21 |
-
|
22 |
-
cursor: pointer;
|
23 |
-
}
|
24 |
-
.doc-label {
|
25 |
-
font-size: 0.8em;
|
26 |
-
position: absolute;
|
27 |
-
top: 10px;
|
28 |
-
left: 10px;
|
29 |
}
|
30 |
.doc-short, .doc-full {
|
31 |
color: white;
|
32 |
-
display: block;
|
33 |
-
margin-top: 20px;
|
34 |
-
}
|
35 |
-
.doc-full {
|
36 |
-
display: none;
|
37 |
}
|
38 |
-
|
39 |
-
|
40 |
-
<script>
|
41 |
-
document.addEventListener("DOMContentLoaded", function() {
|
42 |
-
{% for doc in documents %}
|
43 |
-
document.getElementById("box{{ loop.index }}").addEventListener("click", function() {
|
44 |
-
toggleContent('doc{{ loop.index }}');
|
45 |
-
});
|
46 |
-
{% endfor %}
|
47 |
-
});
|
48 |
-
|
49 |
-
function toggleContent(docID) {
|
50 |
-
var shortContent = document.getElementById(docID + '-short');
|
51 |
-
var fullContent = document.getElementById(docID + '-full');
|
52 |
-
if (fullContent.style.display === 'none') {
|
53 |
-
shortContent.style.display = 'none';
|
54 |
-
fullContent.style.display = 'block';
|
55 |
-
} else {
|
56 |
-
shortContent.style.display = 'block';
|
57 |
-
fullContent.style.display = 'none';
|
58 |
}
|
59 |
-
|
60 |
-
</script>
|
|
|
1 |
+
<h2>Prompt</h2>
|
2 |
+
Below is the prompt that is given to the model. <br><br>
|
3 |
<b>Instructions</b>:
|
4 |
+
<span style="color: #FF00FF;">Use the following pieces of context to answer the question at the end.<br>If you don't know the answer, just say that you don't know, <span style="color: #FF00FF; font-weight: bold;">don't try to make up an answer.</span></span><br>
|
5 |
|
6 |
<b>Context</b>:
|
7 |
{% for doc in documents %}
|
8 |
+
<details class="doc-box">
|
9 |
+
<summary>
|
10 |
+
<b>Doc {{ loop.index }}:</b> <span class="doc-short">{{ doc.content[:100] }}...</span>
|
11 |
+
</summary>
|
12 |
+
<div class="doc-full">{{ doc.content }}</div>
|
13 |
+
</details>
|
14 |
{% endfor %}
|
15 |
<b>Query</b>: <span style="color: yellow;">{{ query }}</span>
|
16 |
|
17 |
<style>
|
18 |
.doc-box {
|
|
|
19 |
padding: 10px;
|
20 |
margin-top: 10px;
|
|
|
21 |
background-color: #1E90FF;
|
22 |
+
border: none;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
}
|
24 |
.doc-short, .doc-full {
|
25 |
color: white;
|
|
|
|
|
|
|
|
|
|
|
26 |
}
|
27 |
+
summary::-webkit-details-marker {
|
28 |
+
color: white;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
}
|
30 |
+
</style>
|
|