arabic-RAG / templates /template_html.j2
derek-thomas's picture
derek-thomas HF staff
Adding arabic examples and fixing rendering
0665e63
raw history blame
No virus
3.58 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Information Page</title>
<link rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600&amp;display=swap">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&amp;display=swap">
<style>
* {
font-family: "Source Sans Pro";
}
.instructions > * {
color: #111 !important;
}
details.doc-box * {
color: #111 !important;
}
details.doc-box a {
color: #0000EE !important; /* This is a common blue color for links */
text-decoration: underline; /* This underlines the link */
}
.dark {
background: #111;
color: white;
}
.doc-box {
padding: 10px;
margin-top: 10px;
background-color: #baecc2;
border-radius: 6px;
color: #111 !important;
max-width: 700px;
box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 2px 0px;
}
.doc-full {
margin: 10px 14px;
line-height: 1.6rem;
}
.instructions {
color: #111 !important;
background: #b7bdfd;
display: block;
border-radius: 6px;
padding: 6px 10px;
line-height: 1.6rem;
max-width: 700px;
box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 2px 0px;
}
.query {
color: #111 !important;
background: #ffbcbc;
display: block;
border-radius: 6px;
padding: 6px 10px;
line-height: 1.6rem;
max-width: 700px;
box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 2px 0px;
}
</style>
</head>
<body>
<div class="prose svelte-1ybaih5" id="component-6">
<h2>الموجه</h2>
فيما يلي الموجه الذي تم تقديمه للنموذج.
<hr>
<h2>تعليمات</h2>
<span class="instructions" dir="rtl">استخدم الأجزاء التالية من السياق للإجابة على السؤال في النهاية. <brإذا كنت لا تعرف الإجابة، فقط قل أنك لا تعرف،<span
style="font-weight: bold;">لا تحاول اختلاق إجابة.</span></span><br>
<h2>سياق</h2>
{% for doc in documents %}
<details class="doc-box" dir="rtl">
<summary>
<b>وثيقة_{{ loop.index }} | <a href="{{ doc.meta.url }}">{{ doc.meta.title }}</a>:</b> <span
class="doc-short">{{ doc.content[:50] }}...</span>
</summary>
<div class="doc-full">{{ doc.content }}</div>
</details>
{% endfor %}
<h2>استفسار</h2>
<span class="query" dir="rtl">{{ query }}</span>
</div>
<script>
document.addEventListener("DOMContentLoaded", function () {
const detailsElements = document.querySelectorAll('.doc-box');
detailsElements.forEach(detail => {
detail.addEventListener('toggle', function () {
const docShort = this.querySelector('.doc-short');
if (this.open) {
docShort.style.display = 'none';
} else {
docShort.style.display = 'inline';
}
});
});
});
</script>
</body>
</html>