Download index.html from Master-Ali/chatbot-backend: direct link, hf CLI and curl.
- Browser
- Download file 630 Bytes
-
https://huggingface.co/spaces/Master-Ali/chatbot-backend/resolve/main/index.html
- Command line
-
hf download hf://spaces/Master-Ali/chatbot-backend/index.html
-
curl -L -o index.html https://huggingface.co/spaces/Master-Ali/chatbot-backend/resolve/main/index.html
630 Bytes
| <html> | |
| <head> | |
| <title>Chatbot Test</title> | |
| </head> | |
| <body> | |
| <h2>Chatbot</h2> | |
| <input id="msg" placeholder="Type message..." /> | |
| <button onclick="send()">Send</button> | |
| <pre id="reply"></pre> | |
| <script> | |
| async function send() { | |
| const msg = document.getElementById("msg").value; | |
| const res = await fetch("/chat", { | |
| method: "POST", | |
| headers: { | |
| "Content-Type": "application/json" | |
| }, | |
| body: JSON.stringify({ message: msg }) | |
| }); | |
| const data = await res.json(); | |
| document.getElementById("reply").innerText = data.reply; | |
| } | |
| </script> | |
| </body> | |
| </html> | |