Download templates/api.html from deedrop1140/machinelearningalgorithms: direct link, hf CLI and curl.
- Browser
- Download file 525 Bytes
-
https://huggingface.co/spaces/deedrop1140/machinelearningalgorithms/resolve/main/templates/api.html
- Command line
-
hf download hf://spaces/deedrop1140/machinelearningalgorithms/templates/api.html
-
curl -L -o api.html https://huggingface.co/spaces/deedrop1140/machinelearningalgorithms/resolve/main/templates/api.html
525 Bytes
| <script> | |
| async function authFetch(url, options = {}) { | |
| const token = localStorage.getItem("jwt_token"); | |
| options.headers = { | |
| ...(options.headers || {}), | |
| "Authorization": "Bearer " + token, | |
| "Content-Type": "application/json" | |
| }; | |
| const response = await fetch(url, options); | |
| if (response.status === 401) { | |
| alert("Session expired. Please login again."); | |
| window.location.href = "/auth/login"; | |
| return; | |
| } | |
| return response.json(); | |
| } | |
| </script> | |