|
Download README.md from Namith/NSK: direct link, hf CLI and curl.
- Browser
- Download file 935 Bytes
-
https://huggingface.co/Namith/NSK/resolve/main/README.md
- Command line
-
hf download hf://Namith/NSK/README.md
-
curl -L -o README.md https://huggingface.co/Namith/NSK/resolve/main/README.md
935 Bytes
| const form = document.getElementById("search-form"); | |
| const searchBox = document.getElementById("search-box"); | |
| const resultsDiv = document.getElementById("results"); | |
| form.addEventListener("submit", (event) => { | |
| event.preventDefault(); | |
| const query = searchBox.value; | |
| if (query.trim() === "") { | |
| return; | |
| } | |
| search(query); | |
| }); | |
| async function search(query) { | |
| const response = await fetch(`http://example.com/search?q=${query}`); | |
| const data = await response.json(); | |
| showResults(data.results); | |
| } | |
| function showResults(results) { | |
| resultsDiv.innerHTML = ""; | |
| for (let result of results) { | |
| const div = document.createElement("div"); | |
| const title = document.createElement("h2"); | |
| title.textContent = result.title; | |
| const url = document.createElement("a"); | |
| url.href = result.url; | |
| url.textContent = result.url; | |
| div.appendChild(title); | |
| div.appendChild(url); | |
| resultsDiv.appendChild(div); | |
| } | |
| } | |