Spaces:
Runtime error
Runtime error
Download index.html from timbosssds/testhtml: direct link, hf CLI and curl.
- Browser
- Download file 793 Bytes
-
https://huggingface.co/spaces/timbosssds/testhtml/resolve/main/index.html
- Command line
-
hf download hf://spaces/timbosssds/testhtml/index.html
-
curl -L -o index.html https://huggingface.co/spaces/timbosssds/testhtml/resolve/main/index.html
793 Bytes
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>LLM Text App</title> | |
| </head> | |
| <body> | |
| <h1>Text Input</h1> | |
| <textarea id="user_input" rows="5"></textarea> | |
| <br> | |
| <button onclick="sendRequest()">Send to LLM</button> | |
| <p id="output"></p> | |
| <script> | |
| async function sendRequest() { | |
| const userInput = document.getElementById("user_input").value; | |
| const response = await fetch('/predict', { | |
| method: 'POST', | |
| headers: { 'Content-Type': 'application/json' }, | |
| body: JSON.stringify({ input: userInput }) | |
| }); | |
| const data = await response.json(); | |
| document.getElementById("output").innerHTML = data.output; | |
| } | |
| </script> | |
| </body> | |
| </html> | |