Skip to content

Commit a2a37ac

Browse files
Merge pull request #84 from LLMSQL/page
Page
2 parents e1b1419 + 52f7e31 commit a2a37ac

1 file changed

Lines changed: 78 additions & 9 deletions

File tree

docs/_templates/index.html

Lines changed: 78 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<h4>ON THIS PAGE</h4>
3131
<ul>
3232
<li><a href="#description">Description</a></li>
33-
<li><a href="#improvements">Key improvements</a></li>
33+
<li><a href="#latest-news">Latest News</a></li>
3434
<li><a href="#documentation">Documentation</a></li>
3535
<li><a href="#quick-start">Quick Start</a></li>
3636
<li><a href="#links">Links</a></li>
@@ -68,21 +68,20 @@ <h1>Welcome to LLMSQL Project</h1>
6868
<p style="margin-top:10px;">LLMSQL is a Python package for evaluation Hugging Face models on LLMSQL benchmark with transformers and vLLM.</p>
6969
</div>
7070

71-
<h2 id="description">💡 Description</h2>
71+
<h2 id="description">Description</h2>
7272
<p><strong>LLMSQL Benchmark</strong> is an <strong>open-source framework</strong> providing a <strong>modernized, cleaned, and extended version of the original WikiSQL dataset</strong>, specifically designed for evaluating Hugging Face style <strong>Large Language Models (LLMs)</strong> on <strong>Text-to-SQL</strong> tasks.</p>
7373

74-
<h2 id="improvements">Key improvements</h2>
75-
<ul>
76-
<li><strong>Data Cleaning:</strong> Resolved duplicates, datatype mismatches, and inconsistent casing, reducing the widespread occurrence of empty query results.</li>
77-
<li><strong>LLM-Ready Format:</strong> Reformatted SQL queries stored in WikiSQL’s custom encoding into standard SQL syntax.</li>
78-
</ul>
74+
<h2 id="latest-news">📣 Latest News</h2>
75+
<div id="latest-news-container" class="custom-highlight-box">
76+
<p>Loading latest news...</p>
77+
</div>
7978

80-
<h2 id="documentation">📚 Documentation</h2>
79+
<h2 id="documentation">Documentation</h2>
8180
<div class="note-box">
8281
<p><strong>Note:</strong> Documentation pages (installation guide, API reference) are <strong>under construction</strong>. <br> See <strong>Quick Start</strong> below or the README files inside the <a href="https://github.com/LLMSQL/llmsql-benchmark/" target="_blank">repo</a>.</p>
8382
</div>
8483

85-
<h2 id="quick-start">Quick Start</h2>
84+
<h2 id="quick-start">Quick Start</h2>
8685
<div class="custom-highlight-box">
8786
<p><strong>⚠️ WARNING — Reproducibility</strong></p>
8887

@@ -150,6 +149,7 @@ <h2 id="links">🔗 Resources</h2>
150149
<tr><td>📦 <strong>PyPI Project</strong></td><td><a href="https://pypi.org/project/llmsql/">llmsql on PyPI</a></td></tr>
151150
<tr><td>💾 <strong>Dataset on Hugging Face</strong></td><td><a href="https://huggingface.co/datasets/llmsql-bench/llmsql-benchmark">llmsql-bench dataset</a></td></tr>
152151
<tr><td>💻 <strong>Source Code</strong></td><td><a href="https://github.com/LLMSQL/llmsql-benchmark">GitHub repo</a></td></tr>
152+
<tr><td>💻 <strong>Playground</strong></td><td><a href="https://huggingface.co/spaces/pihull/llmsql-interactive-q-a">HF Space</a></td></tr>
153153
</tbody>
154154
</table>
155155

@@ -200,6 +200,75 @@ <h2 id="citation">📄 Citation</h2>
200200
});
201201
});
202202
</script>
203+
<script>
204+
async function loadLatestNews() {
205+
const container = document.getElementById("latest-news-container");
206+
207+
try {
208+
const response = await fetch(
209+
"https://api.github.com/repos/LLMSQL/llmsql-benchmark/readme"
210+
);
211+
212+
const data = await response.json();
213+
const content = atob(data.content);
214+
215+
const match = content.match(
216+
/## Latest News[\s\S]*?(?=\n## |\n# |$)/
217+
);
218+
219+
if (!match) {
220+
container.innerHTML = "<p>No latest news found.</p>";
221+
return;
222+
}
223+
224+
const newsMarkdown = match[0]
225+
.replace("## Latest News 📣", "")
226+
.trim();
227+
228+
const lines = newsMarkdown
229+
.split("\n")
230+
.filter(l => l.startsWith("*"));
231+
232+
const htmlList = `
233+
<ul>
234+
${lines.map(line => {
235+
const text = line.replace(/^\*\s*/, "");
236+
237+
const withLinks = text.replace(
238+
/\[([^\]]+)\]\(([^)]+)\)/g,
239+
(match, label, url) => {
240+
if (url.startsWith("http://") || url.startsWith("https://")) {
241+
return `<a href="${url}" target="_blank" rel="noopener">${label}</a>`;
242+
}
243+
244+
const cleanPath = url.replace(/^\.\//, "");
245+
246+
const [path, anchor] = cleanPath.split("#");
247+
248+
const githubUrl =
249+
"https://github.com/LLMSQL/llmsql-benchmark/blob/main/" +
250+
path +
251+
(anchor ? `#${anchor}` : "");
252+
253+
return `<a href="${githubUrl}" target="_blank" rel="noopener">${label}</a>`;
254+
}
255+
);
256+
257+
return `<li>${withLinks}</li>`;
258+
}).join("")}
259+
</ul>
260+
`;
261+
262+
container.innerHTML = htmlList;
263+
264+
} catch (error) {
265+
container.innerHTML =
266+
"<p>Unable to load latest news from GitHub. See the repo yourself: https://github.com/LLMSQL/llmsql-benchmark/blob/main/</p>";
267+
}
268+
}
269+
270+
document.addEventListener("DOMContentLoaded", loadLatestNews);
271+
</script>
203272

204273

205274
</body>

0 commit comments

Comments
 (0)