Ashima commited on
Commit
1f08648
·
verified ·
1 Parent(s): 0a0c410

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +58 -19
index.html CHANGED
@@ -1,19 +1,58 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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>