Spaces:
Runtime error
Runtime error
Download script.js from PoseyATX/BillWork: direct link, hf CLI and curl.
- Browser
- Download file 552 Bytes
-
https://huggingface.co/spaces/PoseyATX/BillWork/resolve/refs%2Fpr%2F1/script.js
- Command line
-
hf download hf://spaces/PoseyATX/BillWork@refs/pr/1/script.js
-
curl -L -o script.js https://huggingface.co/spaces/PoseyATX/BillWork/resolve/refs%2Fpr%2F1/script.js
552 Bytes
| const textGenForm = document.querySelector(".text-gen-form"); | |
| const translateText = async (text) => { | |
| const inferResponse = await fetch(`Wobbly-Caribou?input=${text}`); | |
| const inferJson = await inferResponse.json(); | |
| return inferJson.output; | |
| }; | |
| textGenForm.addEventListener("submit", async (event) => { | |
| event.preventDefault(); | |
| const textGenInput = document.getElementById("text-gen-input"); | |
| const textGenParagraph = document.querySelector(".text-gen-output"); | |
| textGenParagraph.textContent = await translateText(textGenInput.value); | |
| }); |