Add component: GPU Monitor
#21
by
elismasilva - opened
- components/gpu-monitor.json +2 -2
- manifest.json +14 -14
components/gpu-monitor.json
CHANGED
|
@@ -11,13 +11,13 @@
|
|
| 11 |
],
|
| 12 |
"html_template": "\n <div class=\"gpu-monitor-container\">\n <div class=\"gpu-header\">\n <h1 class=\"gpu-title\">GPU Monitor</h1>\n ${show_last_updated === 'true' ? `<div class=\"gpu-time\">Last updated: <span id=\"gpu-time-val\">Loading...</span></div>` : ''}\n </div>\n <div id=\"gpu-alert\"></div>\n <div id=\"gpu-root\" class=\"gpu-grid\"></div>\n </div>\n ",
|
| 13 |
"css_template": "\n .gpu-monitor-container {\n font-family: \"Inter\", sans-serif;\n width: 100%;\n }\n\n .gpu-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 1rem;\n }\n\n .gpu-title {\n font-size: 1.125rem;\n margin: 0;\n font-weight: 500;\n color: var(--body-text-color);\n }\n\n .gpu-time {\n font-size: 0.75rem;\n color: var(--body-text-color-subdued);\n }\n\n .gpu-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));\n gap: 1rem;\n }\n\n .gpu-card {\n background-color: var(--background-fill-secondary);\n border-radius: 0.75rem;\n box-shadow: var(--shadow-drop-md);\n border: 1px solid var(--border-color-primary);\n overflow: hidden;\n transition: box-shadow 0.3s ease;\n }\n\n .gpu-card:hover {\n box-shadow: var(--shadow-drop-lg);\n }\n\n .gpu-card-header {\n background-color: var(--background-fill-primary);\n padding: 0.75rem 1rem;\n display: flex;\n justify-content: space-between;\n align-items: center;\n border-bottom: 1px solid var(--border-color-primary);\n }\n\n .gpu-name {\n font-weight: 600;\n color: var(--body-text-color);\n margin: 0;\n font-size: 0.9rem;\n }\n\n .gpu-badge {\n padding: 0.125rem 0.5rem;\n background-color: var(--background-fill-secondary);\n border-radius: 9999px;\n font-size: 0.75rem;\n color: var(--body-text-color);\n }\n\n .gpu-body {\n padding: 1rem;\n }\n\n .gpu-metrics-grid {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 1rem;\n }\n\n .metric-item {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n margin-bottom: 0.75rem;\n }\n\n .metric-label {\n font-size: 0.75rem;\n color: var(--body-text-color-subdued);\n margin: 0;\n }\n\n .metric-value {\n font-size: 0.875rem;\n font-weight: 500;\n margin: 0;\n color: var(--body-text-color);\n }\n\n .progress-header {\n display: flex;\n align-items: center;\n margin-bottom: 0.25rem;\n }\n\n .progress-header span {\n margin-left: auto;\n font-size: 0.75rem;\n color: var(--body-text-color);\n }\n\n .progress-track {\n width: 100%;\n background-color: var(--neutral-200);\n border-radius: 9999px;\n height: 0.35rem;\n margin-bottom: 0.75rem;\n overflow: hidden;\n }\n\n .progress-fill {\n height: 100%;\n border-radius: 9999px;\n transition:\n width 0.3s ease,\n background-color 0.3s ease;\n }\n\n .progress-footer {\n font-size: 0.75rem;\n color: var(--body-text-color-subdued);\n margin-top: -0.5rem;\n }\n\n .gpu-footer {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 1rem;\n padding-top: 0.5rem;\n margin-top: 0.5rem;\n border-top: 1px solid var(--border-color-primary);\n }\n\n .text-emerald-500 {\n color: #10b981 !important;\n stroke: #10b981 !important;\n }\n\n .bg-emerald-500 {\n background-color: #10b981 !important;\n }\n\n .text-amber-500 {\n color: #f59e0b !important;\n stroke: #f59e0b !important;\n }\n\n .bg-amber-500 {\n background-color: #f59e0b !important;\n }\n\n .text-rose-500 {\n color: #f43f5e !important;\n stroke: #f43f5e !important;\n }\n\n .bg-rose-500 {\n background-color: #f43f5e !important;\n }\n\n .text-blue-500 {\n color: #3b82f6 !important;\n stroke: #3b82f6 !important;\n }\n\n .bg-blue-500 {\n background-color: #3b82f6 !important;\n }\n\n .text-purple-500 {\n color: #a855f7 !important;\n stroke: #a855f7 !important;\n }\n\n .icon-muted {\n color: var(--body-text-color-subdued) !important;\n stroke: var(--body-text-color-subdued) !important;\n }\n\n .icon {\n width: 16px;\n height: 16px;\n stroke-width: 2.2;\n }\n\n .alert-box {\n background-color: rgba(245, 158, 11, 0.1);\n border: 1px solid #f59e0b;\n color: #d97706;\n padding: 0.75rem 1rem;\n border-radius: 0.5rem;\n margin-bottom: 1rem;\n font-size: 0.875rem;\n }\n ",
|
| 14 |
-
"js_on_load": "\n const root = element.querySelector(
|
| 15 |
"default_props": {
|
| 16 |
"value": "",
|
| 17 |
"update_interval": 2000,
|
| 18 |
"show_last_updated": "true"
|
| 19 |
},
|
| 20 |
-
"python_code": "class GPUMonitor(gr.HTML):\n def __init__(\n self, \n update_interval=1000,\n show_last_updated=True,\n **kwargs\n ):\n\n html_template = \"\"\"\n <div class=\"gpu-monitor-container\">\n <div class=\"gpu-header\">\n <h1 class=\"gpu-title\">GPU Monitor</h1>\n ${show_last_updated === 'true' ? `<div class=\"gpu-time\">Last updated: <span id=\"gpu-time-val\">Loading...</span></div>` : ''}\n </div>\n <div id=\"gpu-alert\"></div>\n <div id=\"gpu-root\" class=\"gpu-grid\"></div>\n </div>\n \"\"\"\n\n css_template = \"\"\"\n .gpu-monitor-container {\n font-family: \"Inter\", sans-serif;\n width: 100%;\n }\n\n .gpu-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 1rem;\n }\n\n .gpu-title {\n font-size: 1.125rem;\n margin: 0;\n font-weight: 500;\n color: var(--body-text-color);\n }\n\n .gpu-time {\n font-size: 0.75rem;\n color: var(--body-text-color-subdued);\n }\n\n .gpu-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));\n gap: 1rem;\n }\n\n .gpu-card {\n background-color: var(--background-fill-secondary);\n border-radius: 0.75rem;\n box-shadow: var(--shadow-drop-md);\n border: 1px solid var(--border-color-primary);\n overflow: hidden;\n transition: box-shadow 0.3s ease;\n }\n\n .gpu-card:hover {\n box-shadow: var(--shadow-drop-lg);\n }\n\n .gpu-card-header {\n background-color: var(--background-fill-primary);\n padding: 0.75rem 1rem;\n display: flex;\n justify-content: space-between;\n align-items: center;\n border-bottom: 1px solid var(--border-color-primary);\n }\n\n .gpu-name {\n font-weight: 600;\n color: var(--body-text-color);\n margin: 0;\n font-size: 0.9rem;\n }\n\n .gpu-badge {\n padding: 0.125rem 0.5rem;\n background-color: var(--background-fill-secondary);\n border-radius: 9999px;\n font-size: 0.75rem;\n color: var(--body-text-color);\n }\n\n .gpu-body {\n padding: 1rem;\n }\n\n .gpu-metrics-grid {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 1rem;\n }\n\n .metric-item {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n margin-bottom: 0.75rem;\n }\n\n .metric-label {\n font-size: 0.75rem;\n color: var(--body-text-color-subdued);\n margin: 0;\n }\n\n .metric-value {\n font-size: 0.875rem;\n font-weight: 500;\n margin: 0;\n color: var(--body-text-color);\n }\n\n .progress-header {\n display: flex;\n align-items: center;\n margin-bottom: 0.25rem;\n }\n\n .progress-header span {\n margin-left: auto;\n font-size: 0.75rem;\n color: var(--body-text-color);\n }\n\n .progress-track {\n width: 100%;\n background-color: var(--neutral-200);\n border-radius: 9999px;\n height: 0.35rem;\n margin-bottom: 0.75rem;\n overflow: hidden;\n }\n\n .progress-fill {\n height: 100%;\n border-radius: 9999px;\n transition:\n width 0.3s ease,\n background-color 0.3s ease;\n }\n\n .progress-footer {\n font-size: 0.75rem;\n color: var(--body-text-color-subdued);\n margin-top: -0.5rem;\n }\n\n .gpu-footer {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 1rem;\n padding-top: 0.5rem;\n margin-top: 0.5rem;\n border-top: 1px solid var(--border-color-primary);\n }\n\n .text-emerald-500 {\n color: #10b981 !important;\n stroke: #10b981 !important;\n }\n\n .bg-emerald-500 {\n background-color: #10b981 !important;\n }\n\n .text-amber-500 {\n color: #f59e0b !important;\n stroke: #f59e0b !important;\n }\n\n .bg-amber-500 {\n background-color: #f59e0b !important;\n }\n\n .text-rose-500 {\n color: #f43f5e !important;\n stroke: #f43f5e !important;\n }\n\n .bg-rose-500 {\n background-color: #f43f5e !important;\n }\n\n .text-blue-500 {\n color: #3b82f6 !important;\n stroke: #3b82f6 !important;\n }\n\n .bg-blue-500 {\n background-color: #3b82f6 !important;\n }\n\n .text-purple-500 {\n color: #a855f7 !important;\n stroke: #a855f7 !important;\n }\n\n .icon-muted {\n color: var(--body-text-color-subdued) !important;\n stroke: var(--body-text-color-subdued) !important;\n }\n\n .icon {\n width: 16px;\n height: 16px;\n stroke-width: 2.2;\n }\n\n .alert-box {\n background-color: rgba(245, 158, 11, 0.1);\n border: 1px solid #f59e0b;\n color: #d97706;\n padding: 0.75rem 1rem;\n border-radius: 0.5rem;\n margin-bottom: 1rem;\n font-size: 0.875rem;\n }\n \"\"\"\n\n js_on_load = \"\"\"\n const root = element.querySelector('#gpu-root');\n const timeVal = element.querySelector('#gpu-time-val');\n const alertBox = element.querySelector('#gpu-alert');\n let intervalId;\n let renderedGpuCount = -1; \n\n const formatMemory = (mb) => mb >= 1024 ? `${(mb / 1024).toFixed(1)} GB` : `${mb} MB`;\n const getUtilColor = (val) => val < 30 ? 'bg-emerald-500' : val < 70 ? 'bg-amber-500' : 'bg-rose-500';\n const getTempColor = (temp) => temp < 50 ? 'text-emerald-500' : temp < 80 ? 'text-amber-500' : 'text-rose-500';\n\n function initLucide(retries = 8, delay = 200) {\n if (window.lucide) {\n window.lucide.createIcons({ root: root });\n } else if (retries > 0) {\n setTimeout(() => initLucide(retries - 1, delay), delay);\n }\n }\n\n const generateGPUCard = (gpu) => `\n <div class=\"gpu-card\" id=\"gpu-card-${gpu.index}\">\n <div class=\"gpu-card-header\">\n <h2 class=\"gpu-name\">${gpu.name}</h2>\n <span class=\"gpu-badge\"># ${gpu.index}</span>\n </div>\n <div class=\"gpu-body\">\n <div class=\"gpu-metrics-grid\">\n <div>\n <div class=\"metric-item\">\n <i data-lucide=\"thermometer\" id=\"icon-temp-${gpu.index}\" class=\"icon ${getTempColor(gpu.temperature)}\"></i>\n <div>\n <p class=\"metric-label\">Temperature</p>\n <p class=\"metric-value ${getTempColor(gpu.temperature)}\" id=\"val-temp-${gpu.index}\">${gpu.temperature}\u00b0C</p>\n </div>\n </div>\n <div class=\"metric-item\">\n <i data-lucide=\"fan\" class=\"icon text-blue-500\"></i>\n <div>\n <p class=\"metric-label\">Fan Speed</p>\n <p class=\"metric-value text-blue-500\" id=\"val-fan-${gpu.index}\">${gpu.fan.speed}%</p>\n </div>\n </div>\n </div>\n <div>\n <div class=\"progress-header\">\n <i data-lucide=\"cpu\" class=\"icon icon-muted\" style=\"margin-right:4px;\"></i>\n <p class=\"metric-label\">GPU Load</p>\n <span id=\"val-util-${gpu.index}\">${gpu.utilization.gpu}%</span>\n </div>\n <div class=\"progress-track\">\n <div id=\"bar-util-${gpu.index}\" class=\"progress-fill ${getUtilColor(gpu.utilization.gpu)}\" style=\"width: ${gpu.utilization.gpu}%\"></div>\n </div>\n\n <div class=\"progress-header\" style=\"margin-top: 12px;\">\n <i data-lucide=\"hard-drive\" class=\"icon text-blue-500\" style=\"margin-right:4px;\"></i>\n <p class=\"metric-label\">Memory</p>\n <span id=\"val-mem-pct-${gpu.index}\">${((gpu.memory.used / gpu.memory.total) * 100).toFixed(1)}%</span>\n </div>\n <div class=\"progress-track\">\n <div id=\"bar-mem-${gpu.index}\" class=\"progress-fill bg-blue-500\" style=\"width: ${(gpu.memory.used / gpu.memory.total) * 100}%\"></div>\n </div>\n <p class=\"progress-footer\" id=\"val-mem-text-${gpu.index}\">${formatMemory(gpu.memory.used)} / ${formatMemory(gpu.memory.total)}</p>\n </div>\n </div>\n <div class=\"gpu-footer\">\n <div class=\"metric-item\" style=\"margin:0\">\n <i data-lucide=\"clock\" class=\"icon text-purple-500\"></i>\n <div>\n <p class=\"metric-label\">Clock Speed</p>\n <p class=\"metric-value\" id=\"val-clock-${gpu.index}\">${gpu.clocks.graphics} MHz</p>\n </div>\n </div>\n <div class=\"metric-item\" style=\"margin:0\">\n <i data-lucide=\"zap\" class=\"icon text-amber-500\"></i>\n <div>\n <p class=\"metric-label\">Power Draw</p>\n <p class=\"metric-value\"><span id=\"val-power-${gpu.index}\">${gpu.power.draw.toFixed(1)}</span>W <span style=\"font-size:0.7rem; color:var(--body-text-color-subdued)\">/ ${gpu.power.limit}W</span></p>\n </div>\n </div>\n </div>\n </div>\n </div>\n `;\n\n function updateGpuDOM(gpus) {\n gpus.forEach(gpu => {\n document.getElementById(`val-temp-${gpu.index}`).innerText = `${gpu.temperature}\u00b0C`;\n document.getElementById(`val-fan-${gpu.index}`).innerText = `${gpu.fan.speed}%`;\n document.getElementById(`val-util-${gpu.index}`).innerText = `${gpu.utilization.gpu}%`;\n document.getElementById(`val-mem-pct-${gpu.index}`).innerText = `${((gpu.memory.used / gpu.memory.total) * 100).toFixed(1)}%`;\n document.getElementById(`val-mem-text-${gpu.index}`).innerText = `${formatMemory(gpu.memory.used)} / ${formatMemory(gpu.memory.total)}`;\n document.getElementById(`val-clock-${gpu.index}`).innerText = `${gpu.clocks.graphics} MHz`;\n document.getElementById(`val-power-${gpu.index}`).innerText = `${gpu.power.draw.toFixed(1)}`;\n\n const utilBar = document.getElementById(`bar-util-${gpu.index}`);\n utilBar.style.width = `${gpu.utilization.gpu}%`;\n utilBar.className = `progress-fill ${getUtilColor(gpu.utilization.gpu)}`;\n\n document.getElementById(`bar-mem-${gpu.index}`).style.width = `${(gpu.memory.used / gpu.memory.total) * 100}%`;\n\n const newTempClass = getTempColor(gpu.temperature);\n document.getElementById(`val-temp-${gpu.index}`).className = `metric-value ${newTempClass}`;\n\n const tempIconSvg = document.getElementById(`icon-temp-${gpu.index}`);\n if(tempIconSvg) {\n tempIconSvg.setAttribute('class', `lucide lucide-thermometer icon ${newTempClass}`);\n }\n });\n }\n\n async function fetchAndUpdate() {\n try {\n const data = await server.get_gpu_stats();\n\n if (timeVal) {\n timeVal.innerText = new Date().toLocaleTimeString();\n }\n\n if (!data.hasNvidiaSmi && data.error) {\n alertBox.innerHTML = `<div class=\"alert-box\"><strong>Nota:</strong> ${data.error}</div>`;\n }\n\n if (data.gpus && data.gpus.length > 0) {\n if (data.gpus.length !== renderedGpuCount) {\n root.innerHTML = data.gpus.map(gpu => generateGPUCard(gpu)).join('');\n initLucide();\n renderedGpuCount = data.gpus.length;\n } else {\n updateGpuDOM(data.gpus);\n }\n } else {\n root.innerHTML = '<div style=\"color:var(--body-text-color)\">No GPUs found.</div>';\n }\n } catch (error) {\n console.error(\"Fetch GPU error:\", error);\n }\n }\n\n fetchAndUpdate(); \n intervalId = setInterval(fetchAndUpdate, props.update_interval);\n return () => clearInterval(intervalId);\n \"\"\"\n\n super().__init__(\n html_template=html_template, \n css_template=css_template, \n js_on_load=js_on_load, \n server_functions=[get_gpu_stats],\n update_interval=update_interval,\n show_last_updated=str(show_last_updated).lower(),\n **kwargs\n )\n\n def api_info(self): return {\"type\": \"null\"}\n",
|
| 21 |
"head": "<script src=\"https://unpkg.com/lucide@latest\"></script>",
|
| 22 |
"repo_url": "https://huggingface.co/spaces/elismasilva/gradio_gpu_monitor"
|
| 23 |
}
|
|
|
|
| 11 |
],
|
| 12 |
"html_template": "\n <div class=\"gpu-monitor-container\">\n <div class=\"gpu-header\">\n <h1 class=\"gpu-title\">GPU Monitor</h1>\n ${show_last_updated === 'true' ? `<div class=\"gpu-time\">Last updated: <span id=\"gpu-time-val\">Loading...</span></div>` : ''}\n </div>\n <div id=\"gpu-alert\"></div>\n <div id=\"gpu-root\" class=\"gpu-grid\"></div>\n </div>\n ",
|
| 13 |
"css_template": "\n .gpu-monitor-container {\n font-family: \"Inter\", sans-serif;\n width: 100%;\n }\n\n .gpu-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 1rem;\n }\n\n .gpu-title {\n font-size: 1.125rem;\n margin: 0;\n font-weight: 500;\n color: var(--body-text-color);\n }\n\n .gpu-time {\n font-size: 0.75rem;\n color: var(--body-text-color-subdued);\n }\n\n .gpu-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));\n gap: 1rem;\n }\n\n .gpu-card {\n background-color: var(--background-fill-secondary);\n border-radius: 0.75rem;\n box-shadow: var(--shadow-drop-md);\n border: 1px solid var(--border-color-primary);\n overflow: hidden;\n transition: box-shadow 0.3s ease;\n }\n\n .gpu-card:hover {\n box-shadow: var(--shadow-drop-lg);\n }\n\n .gpu-card-header {\n background-color: var(--background-fill-primary);\n padding: 0.75rem 1rem;\n display: flex;\n justify-content: space-between;\n align-items: center;\n border-bottom: 1px solid var(--border-color-primary);\n }\n\n .gpu-name {\n font-weight: 600;\n color: var(--body-text-color);\n margin: 0;\n font-size: 0.9rem;\n }\n\n .gpu-badge {\n padding: 0.125rem 0.5rem;\n background-color: var(--background-fill-secondary);\n border-radius: 9999px;\n font-size: 0.75rem;\n color: var(--body-text-color);\n }\n\n .gpu-body {\n padding: 1rem;\n }\n\n .gpu-metrics-grid {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 1rem;\n }\n\n .metric-item {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n margin-bottom: 0.75rem;\n }\n\n .metric-label {\n font-size: 0.75rem;\n color: var(--body-text-color-subdued);\n margin: 0;\n }\n\n .metric-value {\n font-size: 0.875rem;\n font-weight: 500;\n margin: 0;\n color: var(--body-text-color);\n }\n\n .progress-header {\n display: flex;\n align-items: center;\n margin-bottom: 0.25rem;\n }\n\n .progress-header span {\n margin-left: auto;\n font-size: 0.75rem;\n color: var(--body-text-color);\n }\n\n .progress-track {\n width: 100%;\n background-color: var(--neutral-200);\n border-radius: 9999px;\n height: 0.35rem;\n margin-bottom: 0.75rem;\n overflow: hidden;\n }\n\n .progress-fill {\n height: 100%;\n border-radius: 9999px;\n transition:\n width 0.3s ease,\n background-color 0.3s ease;\n }\n\n .progress-footer {\n font-size: 0.75rem;\n color: var(--body-text-color-subdued);\n margin-top: -0.5rem;\n }\n\n .gpu-footer {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 1rem;\n padding-top: 0.5rem;\n margin-top: 0.5rem;\n border-top: 1px solid var(--border-color-primary);\n }\n\n .text-emerald-500 {\n color: #10b981 !important;\n stroke: #10b981 !important;\n }\n\n .bg-emerald-500 {\n background-color: #10b981 !important;\n }\n\n .text-amber-500 {\n color: #f59e0b !important;\n stroke: #f59e0b !important;\n }\n\n .bg-amber-500 {\n background-color: #f59e0b !important;\n }\n\n .text-rose-500 {\n color: #f43f5e !important;\n stroke: #f43f5e !important;\n }\n\n .bg-rose-500 {\n background-color: #f43f5e !important;\n }\n\n .text-blue-500 {\n color: #3b82f6 !important;\n stroke: #3b82f6 !important;\n }\n\n .bg-blue-500 {\n background-color: #3b82f6 !important;\n }\n\n .text-purple-500 {\n color: #a855f7 !important;\n stroke: #a855f7 !important;\n }\n\n .icon-muted {\n color: var(--body-text-color-subdued) !important;\n stroke: var(--body-text-color-subdued) !important;\n }\n\n .icon {\n width: 16px;\n height: 16px;\n stroke-width: 2.2;\n }\n\n .alert-box {\n background-color: rgba(245, 158, 11, 0.1);\n border: 1px solid #f59e0b;\n color: #d97706;\n padding: 0.75rem 1rem;\n border-radius: 0.5rem;\n margin-bottom: 1rem;\n font-size: 0.875rem;\n }\n ",
|
| 14 |
+
"js_on_load": "\n const root = element.querySelector(\"#gpu-root\");\n const timeVal = element.querySelector(\"#gpu-time-val\");\n const alertBox = element.querySelector(\"#gpu-alert\");\n let renderedGpuCount = -1;\n\n const MOCK_DATA = {\n hasNvidiaSmi: false,\n isMock: true,\n gpus: [\n {\n index: 0,\n name: \"NVIDIA GeForce RTX 4090 (Demo)\",\n temperature: 55,\n fan: { speed: 35 },\n utilization: { gpu: 42, memory: 30 },\n memory: { total: 24576, used: 8192 },\n power: { draw: 150.5, limit: 450.0 },\n clocks: { graphics: 2520 },\n },\n {\n index: 1,\n name: \"NVIDIA GeForce RTX 4090 (Demo)\",\n temperature: 38,\n fan: { speed: 0 },\n utilization: { gpu: 0, memory: 5 },\n memory: { total: 24576, used: 1024 },\n power: { draw: 30.0, limit: 450.0 },\n clocks: { graphics: 210 },\n },\n ],\n };\n\n const formatMemory = (mb) =>\n mb >= 1024 ? `${(mb / 1024).toFixed(1)} GB` : `${mb} MB`;\n const getUtilColor = (val) =>\n val < 30 ? \"bg-emerald-500\" : val < 70 ? \"bg-amber-500\" : \"bg-rose-500\";\n const getTempColor = (temp) =>\n temp < 50\n ? \"text-emerald-500\"\n : temp < 80\n ? \"text-amber-500\"\n : \"text-rose-500\";\n\n function initLucide(retries = 8, delay = 200) {\n if (window.lucide) {\n window.lucide.createIcons({ root: root });\n } else if (retries > 0) {\n setTimeout(() => initLucide(retries - 1, delay), delay);\n }\n }\n\n const generateGPUCard = (gpu) => `\n <div class=\"gpu-card\" id=\"gpu-card-${gpu.index}\">\n <div class=\"gpu-card-header\">\n <h2 class=\"gpu-name\">${gpu.name}</h2>\n <span class=\"gpu-badge\"># ${gpu.index}</span>\n </div>\n <div class=\"gpu-body\">\n <div class=\"gpu-metrics-grid\">\n <div>\n <div class=\"metric-item\">\n <i data-lucide=\"thermometer\" id=\"icon-temp-${gpu.index}\" class=\"icon ${getTempColor(gpu.temperature)}\"></i>\n <div><p class=\"metric-label\">Temperature</p><p class=\"metric-value ${getTempColor(gpu.temperature)}\" id=\"val-temp-${gpu.index}\">${gpu.temperature}\u00b0C</p></div>\n </div>\n <div class=\"metric-item\">\n <i data-lucide=\"fan\" class=\"icon text-blue-500\"></i>\n <div><p class=\"metric-label\">Fan Speed</p><p class=\"metric-value text-blue-500\" id=\"val-fan-${gpu.index}\">${gpu.fan.speed}%</p></div>\n </div>\n </div>\n <div>\n <div class=\"progress-header\"><i data-lucide=\"cpu\" class=\"icon icon-muted\" style=\"margin-right:4px;\"></i><p class=\"metric-label\">GPU Load</p><span id=\"val-util-${gpu.index}\">${gpu.utilization.gpu}%</span></div>\n <div class=\"progress-track\"><div id=\"bar-util-${gpu.index}\" class=\"progress-fill ${getUtilColor(gpu.utilization.gpu)}\" style=\"width: ${gpu.utilization.gpu}%\"></div></div>\n <div class=\"progress-header\" style=\"margin-top: 12px;\"><i data-lucide=\"hard-drive\" class=\"icon text-blue-500\" style=\"margin-right:4px;\"></i><p class=\"metric-label\">Memory</p><span id=\"val-mem-pct-${gpu.index}\">${((gpu.memory.used / gpu.memory.total) * 100).toFixed(1)}%</span></div>\n <div class=\"progress-track\"><div id=\"bar-mem-${gpu.index}\" class=\"progress-fill bg-blue-500\" style=\"width: ${(gpu.memory.used / gpu.memory.total) * 100}%\"></div></div>\n <p class=\"progress-footer\" id=\"val-mem-text-${gpu.index}\">${formatMemory(gpu.memory.used)} / ${formatMemory(gpu.memory.total)}</p>\n </div>\n </div>\n <div class=\"gpu-footer\">\n <div class=\"metric-item\" style=\"margin:0\"><i data-lucide=\"clock\" class=\"icon text-purple-500\"></i><div><p class=\"metric-label\">Clock Speed</p><p class=\"metric-value\" id=\"val-clock-${gpu.index}\">${gpu.clocks.graphics} MHz</p></div></div>\n <div class=\"metric-item\" style=\"margin:0\"><i data-lucide=\"zap\" class=\"icon text-amber-500\"></i><div><p class=\"metric-label\">Power Draw</p><p class=\"metric-value\"><span id=\"val-power-${gpu.index}\">${gpu.power.draw.toFixed(1)}</span>W <span style=\"font-size:0.7rem; color:var(--body-text-color-subdued)\">/ ${gpu.power.limit}W</span></p></div></div>\n </div>\n </div>\n </div>\n `;\n\n function updateGpuDOM(gpus) {\n gpus.forEach((gpu) => {\n const els = {\n t: document.getElementById(`val-temp-${gpu.index}`),\n f: document.getElementById(`val-fan-${gpu.index}`),\n u: document.getElementById(`val-util-${gpu.index}`),\n mp: document.getElementById(`val-mem-pct-${gpu.index}`),\n mt: document.getElementById(`val-mem-text-${gpu.index}`),\n c: document.getElementById(`val-clock-${gpu.index}`),\n p: document.getElementById(`val-power-${gpu.index}`),\n ub: document.getElementById(`bar-util-${gpu.index}`),\n mb: document.getElementById(`bar-mem-${gpu.index}`),\n it: document.getElementById(`icon-temp-${gpu.index}`),\n };\n if (els.t) els.t.innerText = `${gpu.temperature}\u00b0C`;\n if (els.f) els.f.innerText = `${gpu.fan.speed}%`;\n if (els.u) els.u.innerText = `${gpu.utilization.gpu}%`;\n if (els.mp)\n els.mp.innerText = `${((gpu.memory.used / gpu.memory.total) * 100).toFixed(1)}%`;\n if (els.mt)\n els.mt.innerText = `${formatMemory(gpu.memory.used)} / ${formatMemory(gpu.memory.total)}`;\n if (els.c) els.c.innerText = `${gpu.clocks.graphics} MHz`;\n if (els.p) els.p.innerText = `${gpu.power.draw.toFixed(1)}`;\n if (els.ub) {\n els.ub.style.width = `${gpu.utilization.gpu}%`;\n els.ub.className = `progress-fill ${getUtilColor(gpu.utilization.gpu)}`;\n }\n if (els.mb)\n els.mb.style.width = `${(gpu.memory.used / gpu.memory.total) * 100}%`;\n if (els.it)\n els.it.setAttribute(\n \"class\",\n `lucide lucide-thermometer icon ${getTempColor(gpu.temperature)}`,\n );\n if (els.t)\n els.t.className = `metric-value ${getTempColor(gpu.temperature)}`;\n });\n }\n\n async function fetchAndUpdate() {\n let data;\n try {\n if (typeof server !== \"undefined\" && server.get_gpu_stats) {\n data = await server.get_gpu_stats();\n } else {\n data = MOCK_DATA;\n }\n\n if (timeVal) timeVal.innerText = new Date().toLocaleTimeString();\n\n if (!data.hasNvidiaSmi) {\n if (data.error)\n alertBox.innerHTML = `<div class=\"alert-box\"><strong>Nota:</strong> ${data.error}</div>`;\n if (!data.isMock) data = MOCK_DATA;\n }\n\n if (data.gpus && data.gpus.length > 0) {\n if (data.gpus.length !== renderedGpuCount) {\n root.innerHTML = data.gpus.map((gpu) => generateGPUCard(gpu)).join(\"\");\n initLucide();\n renderedGpuCount = data.gpus.length;\n } else {\n updateGpuDOM(data.gpus);\n }\n }\n } catch (error) {\n console.error(\"Fetch GPU error:\", error);\n if (renderedGpuCount === -1) {\n root.innerHTML = MOCK_DATA.gpus\n .map((gpu) => generateGPUCard(gpu))\n .join(\"\");\n initLucide();\n renderedGpuCount = MOCK_DATA.gpus.length;\n }\n }\n }\n\n fetchAndUpdate();\n const intervalId = setInterval(fetchAndUpdate, props.update_interval);\n return () => clearInterval(intervalId);\n\n ",
|
| 15 |
"default_props": {
|
| 16 |
"value": "",
|
| 17 |
"update_interval": 2000,
|
| 18 |
"show_last_updated": "true"
|
| 19 |
},
|
| 20 |
+
"python_code": "class GPUMonitor(gr.HTML):\n def __init__(self, update_interval=1000, show_last_updated=True, **kwargs):\n html_template = \"\"\"\n <div class=\"gpu-monitor-container\">\n <div class=\"gpu-header\">\n <h1 class=\"gpu-title\">GPU Monitor</h1>\n ${show_last_updated === 'true' ? `<div class=\"gpu-time\">Last updated: <span id=\"gpu-time-val\">Loading...</span></div>` : ''}\n </div>\n <div id=\"gpu-alert\"></div>\n <div id=\"gpu-root\" class=\"gpu-grid\"></div>\n </div>\n \"\"\"\n\n css_template = \"\"\"\n .gpu-monitor-container {\n font-family: \"Inter\", sans-serif;\n width: 100%;\n }\n\n .gpu-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 1rem;\n }\n\n .gpu-title {\n font-size: 1.125rem;\n margin: 0;\n font-weight: 500;\n color: var(--body-text-color);\n }\n\n .gpu-time {\n font-size: 0.75rem;\n color: var(--body-text-color-subdued);\n }\n\n .gpu-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));\n gap: 1rem;\n }\n\n .gpu-card {\n background-color: var(--background-fill-secondary);\n border-radius: 0.75rem;\n box-shadow: var(--shadow-drop-md);\n border: 1px solid var(--border-color-primary);\n overflow: hidden;\n transition: box-shadow 0.3s ease;\n }\n\n .gpu-card:hover {\n box-shadow: var(--shadow-drop-lg);\n }\n\n .gpu-card-header {\n background-color: var(--background-fill-primary);\n padding: 0.75rem 1rem;\n display: flex;\n justify-content: space-between;\n align-items: center;\n border-bottom: 1px solid var(--border-color-primary);\n }\n\n .gpu-name {\n font-weight: 600;\n color: var(--body-text-color);\n margin: 0;\n font-size: 0.9rem;\n }\n\n .gpu-badge {\n padding: 0.125rem 0.5rem;\n background-color: var(--background-fill-secondary);\n border-radius: 9999px;\n font-size: 0.75rem;\n color: var(--body-text-color);\n }\n\n .gpu-body {\n padding: 1rem;\n }\n\n .gpu-metrics-grid {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 1rem;\n }\n\n .metric-item {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n margin-bottom: 0.75rem;\n }\n\n .metric-label {\n font-size: 0.75rem;\n color: var(--body-text-color-subdued);\n margin: 0;\n }\n\n .metric-value {\n font-size: 0.875rem;\n font-weight: 500;\n margin: 0;\n color: var(--body-text-color);\n }\n\n .progress-header {\n display: flex;\n align-items: center;\n margin-bottom: 0.25rem;\n }\n\n .progress-header span {\n margin-left: auto;\n font-size: 0.75rem;\n color: var(--body-text-color);\n }\n\n .progress-track {\n width: 100%;\n background-color: var(--neutral-200);\n border-radius: 9999px;\n height: 0.35rem;\n margin-bottom: 0.75rem;\n overflow: hidden;\n }\n\n .progress-fill {\n height: 100%;\n border-radius: 9999px;\n transition:\n width 0.3s ease,\n background-color 0.3s ease;\n }\n\n .progress-footer {\n font-size: 0.75rem;\n color: var(--body-text-color-subdued);\n margin-top: -0.5rem;\n }\n\n .gpu-footer {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 1rem;\n padding-top: 0.5rem;\n margin-top: 0.5rem;\n border-top: 1px solid var(--border-color-primary);\n }\n\n .text-emerald-500 {\n color: #10b981 !important;\n stroke: #10b981 !important;\n }\n\n .bg-emerald-500 {\n background-color: #10b981 !important;\n }\n\n .text-amber-500 {\n color: #f59e0b !important;\n stroke: #f59e0b !important;\n }\n\n .bg-amber-500 {\n background-color: #f59e0b !important;\n }\n\n .text-rose-500 {\n color: #f43f5e !important;\n stroke: #f43f5e !important;\n }\n\n .bg-rose-500 {\n background-color: #f43f5e !important;\n }\n\n .text-blue-500 {\n color: #3b82f6 !important;\n stroke: #3b82f6 !important;\n }\n\n .bg-blue-500 {\n background-color: #3b82f6 !important;\n }\n\n .text-purple-500 {\n color: #a855f7 !important;\n stroke: #a855f7 !important;\n }\n\n .icon-muted {\n color: var(--body-text-color-subdued) !important;\n stroke: var(--body-text-color-subdued) !important;\n }\n\n .icon {\n width: 16px;\n height: 16px;\n stroke-width: 2.2;\n }\n\n .alert-box {\n background-color: rgba(245, 158, 11, 0.1);\n border: 1px solid #f59e0b;\n color: #d97706;\n padding: 0.75rem 1rem;\n border-radius: 0.5rem;\n margin-bottom: 1rem;\n font-size: 0.875rem;\n }\n \"\"\"\n\n js_on_load = \"\"\"\n const root = element.querySelector(\"#gpu-root\");\n const timeVal = element.querySelector(\"#gpu-time-val\");\n const alertBox = element.querySelector(\"#gpu-alert\");\n let renderedGpuCount = -1;\n\n const MOCK_DATA = {\n hasNvidiaSmi: false,\n isMock: true,\n gpus: [\n {\n index: 0,\n name: \"NVIDIA GeForce RTX 4090 (Demo)\",\n temperature: 55,\n fan: { speed: 35 },\n utilization: { gpu: 42, memory: 30 },\n memory: { total: 24576, used: 8192 },\n power: { draw: 150.5, limit: 450.0 },\n clocks: { graphics: 2520 },\n },\n {\n index: 1,\n name: \"NVIDIA GeForce RTX 4090 (Demo)\",\n temperature: 38,\n fan: { speed: 0 },\n utilization: { gpu: 0, memory: 5 },\n memory: { total: 24576, used: 1024 },\n power: { draw: 30.0, limit: 450.0 },\n clocks: { graphics: 210 },\n },\n ],\n };\n\n const formatMemory = (mb) =>\n mb >= 1024 ? `${(mb / 1024).toFixed(1)} GB` : `${mb} MB`;\n const getUtilColor = (val) =>\n val < 30 ? \"bg-emerald-500\" : val < 70 ? \"bg-amber-500\" : \"bg-rose-500\";\n const getTempColor = (temp) =>\n temp < 50\n ? \"text-emerald-500\"\n : temp < 80\n ? \"text-amber-500\"\n : \"text-rose-500\";\n\n function initLucide(retries = 8, delay = 200) {\n if (window.lucide) {\n window.lucide.createIcons({ root: root });\n } else if (retries > 0) {\n setTimeout(() => initLucide(retries - 1, delay), delay);\n }\n }\n\n const generateGPUCard = (gpu) => `\n <div class=\"gpu-card\" id=\"gpu-card-${gpu.index}\">\n <div class=\"gpu-card-header\">\n <h2 class=\"gpu-name\">${gpu.name}</h2>\n <span class=\"gpu-badge\"># ${gpu.index}</span>\n </div>\n <div class=\"gpu-body\">\n <div class=\"gpu-metrics-grid\">\n <div>\n <div class=\"metric-item\">\n <i data-lucide=\"thermometer\" id=\"icon-temp-${gpu.index}\" class=\"icon ${getTempColor(gpu.temperature)}\"></i>\n <div><p class=\"metric-label\">Temperature</p><p class=\"metric-value ${getTempColor(gpu.temperature)}\" id=\"val-temp-${gpu.index}\">${gpu.temperature}\u00b0C</p></div>\n </div>\n <div class=\"metric-item\">\n <i data-lucide=\"fan\" class=\"icon text-blue-500\"></i>\n <div><p class=\"metric-label\">Fan Speed</p><p class=\"metric-value text-blue-500\" id=\"val-fan-${gpu.index}\">${gpu.fan.speed}%</p></div>\n </div>\n </div>\n <div>\n <div class=\"progress-header\"><i data-lucide=\"cpu\" class=\"icon icon-muted\" style=\"margin-right:4px;\"></i><p class=\"metric-label\">GPU Load</p><span id=\"val-util-${gpu.index}\">${gpu.utilization.gpu}%</span></div>\n <div class=\"progress-track\"><div id=\"bar-util-${gpu.index}\" class=\"progress-fill ${getUtilColor(gpu.utilization.gpu)}\" style=\"width: ${gpu.utilization.gpu}%\"></div></div>\n <div class=\"progress-header\" style=\"margin-top: 12px;\"><i data-lucide=\"hard-drive\" class=\"icon text-blue-500\" style=\"margin-right:4px;\"></i><p class=\"metric-label\">Memory</p><span id=\"val-mem-pct-${gpu.index}\">${((gpu.memory.used / gpu.memory.total) * 100).toFixed(1)}%</span></div>\n <div class=\"progress-track\"><div id=\"bar-mem-${gpu.index}\" class=\"progress-fill bg-blue-500\" style=\"width: ${(gpu.memory.used / gpu.memory.total) * 100}%\"></div></div>\n <p class=\"progress-footer\" id=\"val-mem-text-${gpu.index}\">${formatMemory(gpu.memory.used)} / ${formatMemory(gpu.memory.total)}</p>\n </div>\n </div>\n <div class=\"gpu-footer\">\n <div class=\"metric-item\" style=\"margin:0\"><i data-lucide=\"clock\" class=\"icon text-purple-500\"></i><div><p class=\"metric-label\">Clock Speed</p><p class=\"metric-value\" id=\"val-clock-${gpu.index}\">${gpu.clocks.graphics} MHz</p></div></div>\n <div class=\"metric-item\" style=\"margin:0\"><i data-lucide=\"zap\" class=\"icon text-amber-500\"></i><div><p class=\"metric-label\">Power Draw</p><p class=\"metric-value\"><span id=\"val-power-${gpu.index}\">${gpu.power.draw.toFixed(1)}</span>W <span style=\"font-size:0.7rem; color:var(--body-text-color-subdued)\">/ ${gpu.power.limit}W</span></p></div></div>\n </div>\n </div>\n </div>\n `;\n\n function updateGpuDOM(gpus) {\n gpus.forEach((gpu) => {\n const els = {\n t: document.getElementById(`val-temp-${gpu.index}`),\n f: document.getElementById(`val-fan-${gpu.index}`),\n u: document.getElementById(`val-util-${gpu.index}`),\n mp: document.getElementById(`val-mem-pct-${gpu.index}`),\n mt: document.getElementById(`val-mem-text-${gpu.index}`),\n c: document.getElementById(`val-clock-${gpu.index}`),\n p: document.getElementById(`val-power-${gpu.index}`),\n ub: document.getElementById(`bar-util-${gpu.index}`),\n mb: document.getElementById(`bar-mem-${gpu.index}`),\n it: document.getElementById(`icon-temp-${gpu.index}`),\n };\n if (els.t) els.t.innerText = `${gpu.temperature}\u00b0C`;\n if (els.f) els.f.innerText = `${gpu.fan.speed}%`;\n if (els.u) els.u.innerText = `${gpu.utilization.gpu}%`;\n if (els.mp)\n els.mp.innerText = `${((gpu.memory.used / gpu.memory.total) * 100).toFixed(1)}%`;\n if (els.mt)\n els.mt.innerText = `${formatMemory(gpu.memory.used)} / ${formatMemory(gpu.memory.total)}`;\n if (els.c) els.c.innerText = `${gpu.clocks.graphics} MHz`;\n if (els.p) els.p.innerText = `${gpu.power.draw.toFixed(1)}`;\n if (els.ub) {\n els.ub.style.width = `${gpu.utilization.gpu}%`;\n els.ub.className = `progress-fill ${getUtilColor(gpu.utilization.gpu)}`;\n }\n if (els.mb)\n els.mb.style.width = `${(gpu.memory.used / gpu.memory.total) * 100}%`;\n if (els.it)\n els.it.setAttribute(\n \"class\",\n `lucide lucide-thermometer icon ${getTempColor(gpu.temperature)}`,\n );\n if (els.t)\n els.t.className = `metric-value ${getTempColor(gpu.temperature)}`;\n });\n }\n\n async function fetchAndUpdate() {\n let data;\n try {\n if (typeof server !== \"undefined\" && server.get_gpu_stats) {\n data = await server.get_gpu_stats();\n } else {\n data = MOCK_DATA;\n }\n\n if (timeVal) timeVal.innerText = new Date().toLocaleTimeString();\n\n if (!data.hasNvidiaSmi) {\n if (data.error)\n alertBox.innerHTML = `<div class=\"alert-box\"><strong>Nota:</strong> ${data.error}</div>`;\n if (!data.isMock) data = MOCK_DATA;\n }\n\n if (data.gpus && data.gpus.length > 0) {\n if (data.gpus.length !== renderedGpuCount) {\n root.innerHTML = data.gpus.map((gpu) => generateGPUCard(gpu)).join(\"\");\n initLucide();\n renderedGpuCount = data.gpus.length;\n } else {\n updateGpuDOM(data.gpus);\n }\n }\n } catch (error) {\n console.error(\"Fetch GPU error:\", error);\n if (renderedGpuCount === -1) {\n root.innerHTML = MOCK_DATA.gpus\n .map((gpu) => generateGPUCard(gpu))\n .join(\"\");\n initLucide();\n renderedGpuCount = MOCK_DATA.gpus.length;\n }\n }\n }\n\n fetchAndUpdate();\n const intervalId = setInterval(fetchAndUpdate, props.update_interval);\n return () => clearInterval(intervalId);\n\n \"\"\"\n\n super().__init__(\n html_template=html_template, \n css_template=css_template, \n js_on_load=js_on_load, \n server_functions=[get_gpu_stats],\n update_interval=update_interval,\n show_last_updated=str(show_last_updated).lower(),\n **kwargs\n )\n\n def api_info(self): return {\"type\": \"null\"}\n",
|
| 21 |
"head": "<script src=\"https://unpkg.com/lucide@latest\"></script>",
|
| 22 |
"repo_url": "https://huggingface.co/spaces/elismasilva/gradio_gpu_monitor"
|
| 23 |
}
|
manifest.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
| 11 |
"category": "Input",
|
| 12 |
"repo_url": "https://huggingface.co/spaces/multimodalart/qwen-image-multiple-angles-3d-camera/"
|
| 13 |
},
|
| 14 |
-
|
| 15 |
"id": "detection-viewer",
|
| 16 |
"name": "Detection Viewer",
|
| 17 |
"description": "Visualize object detection results \u2014 bounding boxes, segmentation masks, human pose keypoints, skeleton connections, and confidence scores.",
|
|
@@ -90,19 +90,6 @@
|
|
| 90 |
],
|
| 91 |
"category": "input",
|
| 92 |
"repo_url": "https://huggingface.co/spaces/ysharma/drag-and-drop-kanban-board/"
|
| 93 |
-
},
|
| 94 |
-
{
|
| 95 |
-
"id": "gpu-monitor",
|
| 96 |
-
"name": "GPU Monitor",
|
| 97 |
-
"description": "A real-time GPU monitoring component for Gradio apps Inspired by the GPU monitoring widget from the Ostris AI-Toolkit. Perfect for AI training dashboards, LLM hosting interfaces, or any Gradio app where users need to keep an eye on hardware resource consumption.",
|
| 98 |
-
"author": "elismasilva",
|
| 99 |
-
"tags": [
|
| 100 |
-
"monitoring",
|
| 101 |
-
"gpu",
|
| 102 |
-
"training",
|
| 103 |
-
"dashboard"
|
| 104 |
-
],
|
| 105 |
-
"repo_url": "https://huggingface.co/spaces/elismasilva/gradio_gpu_monitor"
|
| 106 |
},
|
| 107 |
{
|
| 108 |
"id": "video-slider",
|
|
@@ -265,5 +252,18 @@
|
|
| 265 |
"description": "",
|
| 266 |
"author": "abidlabs",
|
| 267 |
"tags": []
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 268 |
}
|
| 269 |
]
|
|
|
|
| 11 |
"category": "Input",
|
| 12 |
"repo_url": "https://huggingface.co/spaces/multimodalart/qwen-image-multiple-angles-3d-camera/"
|
| 13 |
},
|
| 14 |
+
{
|
| 15 |
"id": "detection-viewer",
|
| 16 |
"name": "Detection Viewer",
|
| 17 |
"description": "Visualize object detection results \u2014 bounding boxes, segmentation masks, human pose keypoints, skeleton connections, and confidence scores.",
|
|
|
|
| 90 |
],
|
| 91 |
"category": "input",
|
| 92 |
"repo_url": "https://huggingface.co/spaces/ysharma/drag-and-drop-kanban-board/"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 93 |
},
|
| 94 |
{
|
| 95 |
"id": "video-slider",
|
|
|
|
| 252 |
"description": "",
|
| 253 |
"author": "abidlabs",
|
| 254 |
"tags": []
|
| 255 |
+
},
|
| 256 |
+
{
|
| 257 |
+
"id": "gpu-monitor",
|
| 258 |
+
"name": "GPU Monitor",
|
| 259 |
+
"description": "A real-time GPU monitoring component for Gradio apps Inspired by the GPU monitoring widget from the Ostris AI-Toolkit. Perfect for AI training dashboards, LLM hosting interfaces, or any Gradio app where users need to keep an eye on hardware resource consumption.",
|
| 260 |
+
"author": "elismasilva",
|
| 261 |
+
"tags": [
|
| 262 |
+
"monitoring",
|
| 263 |
+
"gpu",
|
| 264 |
+
"training",
|
| 265 |
+
"dashboard"
|
| 266 |
+
],
|
| 267 |
+
"repo_url": "https://huggingface.co/spaces/elismasilva/gradio_gpu_monitor"
|
| 268 |
}
|
| 269 |
]
|