Spaces:
Running
Running
Update index.html
Browse files- index.html +58 -19
index.html
CHANGED
|
@@ -1,19 +1,58 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8" />
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
| 6 |
+
<title>GPU Monitor</title>
|
| 7 |
+
<style>
|
| 8 |
+
body {
|
| 9 |
+
font-family: monospace;
|
| 10 |
+
background: #1e1e1e;
|
| 11 |
+
color: #cfcfcf;
|
| 12 |
+
padding: 2rem;
|
| 13 |
+
}
|
| 14 |
+
pre {
|
| 15 |
+
background: #2d2d2d;
|
| 16 |
+
padding: 1rem;
|
| 17 |
+
border-radius: 10px;
|
| 18 |
+
overflow-x: auto;
|
| 19 |
+
white-space: pre-wrap;
|
| 20 |
+
word-wrap: break-word;
|
| 21 |
+
}
|
| 22 |
+
#refresh {
|
| 23 |
+
background-color: #4CAF50;
|
| 24 |
+
color: white;
|
| 25 |
+
border: none;
|
| 26 |
+
padding: 10px 20px;
|
| 27 |
+
margin-bottom: 20px;
|
| 28 |
+
font-size: 16px;
|
| 29 |
+
border-radius: 5px;
|
| 30 |
+
cursor: pointer;
|
| 31 |
+
}
|
| 32 |
+
#refresh:hover {
|
| 33 |
+
background-color: #45a049;
|
| 34 |
+
}
|
| 35 |
+
</style>
|
| 36 |
+
</head>
|
| 37 |
+
<body>
|
| 38 |
+
<h1>🚀 Remote GPU Status</h1>
|
| 39 |
+
<button id="refresh">🔄 Refresh</button>
|
| 40 |
+
<pre id="gpu-info">Loading...</pre>
|
| 41 |
+
|
| 42 |
+
<script>
|
| 43 |
+
const fetchGpuInfo = async () => {
|
| 44 |
+
try {
|
| 45 |
+
const res = await fetch("gpustat_output.txt");
|
| 46 |
+
if (!res.ok) throw new Error("Failed to fetch file.");
|
| 47 |
+
const text = await res.text();
|
| 48 |
+
document.getElementById("gpu-info").textContent = text;
|
| 49 |
+
} catch (e) {
|
| 50 |
+
document.getElementById("gpu-info").textContent = "Error loading GPU info.";
|
| 51 |
+
}
|
| 52 |
+
};
|
| 53 |
+
|
| 54 |
+
document.getElementById("refresh").addEventListener("click", fetchGpuInfo);
|
| 55 |
+
fetchGpuInfo(); // Load on first visit
|
| 56 |
+
</script>
|
| 57 |
+
</body>
|
| 58 |
+
</html>
|