Spaces:
Sleeping
Sleeping
File size: 1,357 Bytes
1e9310c ea22cb5 1e9310c 5457996 ea22cb5 1e9310c cc6cdde 1e9310c 87bc521 f9cc29a 87bc521 1e9310c b708d79 1e9310c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>My static Space</title>
<link rel="stylesheet" href="https://huggingface.co/spaces/vk-ai-system/flask_inference_api/resolve/main/style.css" />
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<style>
</style>
</head>
<body>
<h1>Настройки системы</h1>
<p>День : <span id="dey"></span></p>
<form>
<p>Укажите нормальную среднюю температуру человека:</p>
<p><input type="number" id="name" value="" min="1" max="14" step="0.05"></p>
</form>
<script>
function updateValues(data) {
document.getElementById("dey").textContent = data.dey;
document.getElementById("name").value = data.dey;
}
function fetchValues() {
var xhr = new XMLHttpRequest();
xhr.open("GET", "/settings_api", true);
xhr.setRequestHeader("Content-Type", "application/json");
xhr.onreadystatechange = function () {
if (xhr.readyState === 4 && xhr.status === 200) {
var response = JSON.parse(xhr.responseText);
updateValues(response);
}
};
xhr.send();
}
fetchValues();
setInterval(fetchValues, 10000);
</script>
</body>
</html> |