Download index.html from Maicoul/interface: direct link, hf CLI and curl.
- Browser
- Download file 1.56 kB
-
https://huggingface.co/spaces/Maicoul/interface/resolve/main/index.html
- Command line
-
hf download hf://spaces/Maicoul/interface/index.html
-
curl -L -o index.html https://huggingface.co/spaces/Maicoul/interface/resolve/main/index.html
1.56 kB
| <html lang="pt-br"> | |
| <head> | |
| <meta charset="UTF-8" /> | |
| <title>Teste DeepSeek API</title> | |
| <style> | |
| body { | |
| font-family: Arial, sans-serif; | |
| padding: 2rem; | |
| max-width: 800px; | |
| margin: auto; | |
| } | |
| textarea, button { | |
| width: 100%; | |
| margin-top: 1rem; | |
| padding: 0.75rem; | |
| font-size: 1rem; | |
| } | |
| #output { | |
| white-space: pre-wrap; | |
| margin-top: 1rem; | |
| background: #f0f0f0; | |
| padding: 1rem; | |
| border-radius: 6px; | |
| min-height: 80px; | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <h1>Jarvis DeepSeek - via API</h1> | |
| <textarea id="prompt" rows="4" placeholder="Digite sua pergunta aqui...">Explique o que é uma API REST.</textarea> | |
| <button onclick="enviarPrompt()">Enviar</button> | |
| <div id="output"></div> | |
| <script> | |
| async function enviarPrompt() { | |
| const prompt = document.getElementById("prompt").value; | |
| const output = document.getElementById("output"); | |
| output.textContent = "Consultando modelo..."; | |
| try { | |
| const response = await fetch("https://maicoul-api-proxy.hf.space/", { | |
| method: "POST", | |
| headers: { "Content-Type": "application/json" }, | |
| body: JSON.stringify({ | |
| prompt: prompt, | |
| n_predict: 100, | |
| temperature: 0.7 | |
| }) | |
| }); | |
| const data = await response.json(); | |
| output.textContent = data.content || JSON.stringify(data, null, 2); | |
| } catch (err) { | |
| output.textContent = "Erro: " + err.message; | |
| } | |
| } | |
| </script> | |
| </body> | |
| </html> | |