Download templates/index.html from Jiakaaa/host: direct link, hf CLI and curl.
- Browser
- Download file 1.35 kB
-
https://huggingface.co/spaces/Jiakaaa/host/resolve/main/templates/index.html
- Command line
-
hf download hf://spaces/Jiakaaa/host/templates/index.html
-
curl -L -o index.html https://huggingface.co/spaces/Jiakaaa/host/resolve/main/templates/index.html
1.35 kB
| <html> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>批量登录测试</title> | |
| <style> | |
| body { font-family: sans-serif; padding: 1rem; } | |
| textarea { width: 100%; height: 300px; margin-top: 1rem; } | |
| </style> | |
| </head> | |
| <body> | |
| <h2>上传 hosts.csv</h2> | |
| <form id="upload-form" enctype="multipart/form-data"> | |
| <input type="file" name="file" required> | |
| <button type="submit">上传</button> | |
| </form> | |
| <h3>操作</h3> | |
| <button onclick="startTest()">开始测试</button> | |
| <a href="/download" target="_blank">下载结果</a> | |
| <h3>进度</h3> | |
| <textarea id="output" readonly></textarea> | |
| <script> | |
| document.getElementById("upload-form").onsubmit = function (e) { | |
| e.preventDefault(); | |
| let formData = new FormData(this); | |
| fetch("/upload", { | |
| method: "POST", | |
| body: formData | |
| }).then(() => alert("上传成功!")); | |
| }; | |
| function startTest() { | |
| fetch("/start", { method: "POST" }); | |
| } | |
| setInterval(() => { | |
| fetch("/progress") | |
| .then(res => res.json()) | |
| .then(data => { | |
| document.getElementById("output").value = data.join("\n"); | |
| }); | |
| }, 2000); | |
| </script> | |
| </body> | |
| </html> |