Dataset Viewer
Auto-converted to Parquet Duplicate
id
stringlengths
9
22
name
stringlengths
9
22
description
stringlengths
30
75
author
stringclasses
4 values
tags
stringlengths
2
54
category
stringclasses
5 values
html_template
stringlengths
77
4.11k
css_template
stringlengths
0
17.1k
js_on_load
stringlengths
163
69.6k
default_props
stringlengths
2
11.5k
head
stringclasses
2 values
python_code
stringlengths
748
25.4k
repo_url
stringclasses
3 values
camera-control3-d
Camera Control3 D
A 3D camera control component using Three.js.
multimodalart
["3D", "Image"]
Input
<div id="camera-control-wrapper" style="width: 100%; height: 450px; position: relative; background: #1a1a1a; border-radius: 12px; overflow: hidden;"> <div id="prompt-overlay" style="position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,0.8); padding: 8px 1...
(() => { const wrapper = element.querySelector('#camera-control-wrapper'); const promptOverlay = element.querySelector('#prompt-overlay'); // Wait for THREE to load const initScene = () => { if (typeof THREE === 'undefined') { ...
{"value": {"azimuth": 0, "elevation": 0, "distance": 1.0}, "imageUrl": null}
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"></script>
class CameraControl3D(gr.HTML): """ A 3D camera control component using Three.js. Outputs: { azimuth: number, elevation: number, distance: number } Accepts imageUrl prop to display user's uploaded image on the plane. """ def __init__(self, value=None, imageUrl=None, **kwargs): if value i...
https://huggingface.co/spaces/multimodalart/qwen-image-multiple-angles-3d-camera/
detection-viewer
Detection Viewer
Rich viewer for object detection model outputs
hysts
[]
display
<div class="pose-viewer-container" data-panel-title="Detections" data-list-height="300" data-score-threshold-min="0.0" data-score-threshold-max="1.0" data-keypoint-threshold="0.0" data-keypoint-radius="3"> <script type="application/json" class="pose-data">${value}</script> <div class="canvas-wrapper"> <canvas><...
.pose-viewer-container { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; user-select: none; width: 100%; position: relative; box-sizing: border-box; } /* ── Maximized Overlay ── */ .pose-viewer-container.maximized { position: fixed; top: 0; left: 0; ...
// Guard: skip if already initialized if (element._poseInitialized) return; element._poseInitialized = true; (function () { "use strict"; var MAX_CANVAS_HEIGHT = 600; var KEYPOINT_RADIUS = 3; var HIT_RADIUS = 10; var MASK_ALPHA = 0.4; var CONNECTION_ALPHA = 0.7; var CONNECTION_WIDTH = 2; ...
{"value": "{\"image\": \"https://huggingface.co/datasets/gradio/custom-html-gallery/resolve/main/assets/hyst_image.webp\", \"annotations\": [{\"keypoints\": [], \"connections\": [], \"color\": \"#FF0000\", \"label\": \"microwave\", \"bbox\": {\"x\": 1254.9686279296875, \"y\": 732.0140991210938, \"width\": 731.187622070...
null
class DetectionViewer(gr.HTML): def __init__( self, value: tuple[str | Path | Image.Image | np.ndarray, list[dict[str, Any]]] | tuple[str | Path | Image.Image | np.ndarray, list[dict[str, Any]], dict[str, Any]] | None = None, *, label: str | None = None, panel...
https://github.com/hysts/gradio-detection-viewer/
contribution-heatmap
Contribution Heatmap
Reusable GitHub-style contribution heatmap
ysharma
["Business"]
Display
<div class="heatmap-container"> <div class="heatmap-header"> <h2>${(() => { const total = Object.values(value || {}).reduce((a, b) => a + b, 0); return '📊 ' + total.toLocaleString() + ' contributions in ' + year; })()}</h2> <div class="legend"> <span>Les...
.heatmap-container { background: #0d1117; border-radius: 12px; padding: 24px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: #c9d1d9; overflow-x: auto; } .heatmap-header { display: flex; justify-content: space-between; ...
element.addEventListener('click', (e) => { if (e.target && e.target.classList.contains('cell') && !e.target.classList.contains('empty')) { const date = e.target.dataset.date; const cur = parseInt(e.target.dataset.count) || 0; const next = cur >= 12 ? 0 : cur + 1; ...
{"value": {"2025-01-01": 15, "2025-01-02": 10, "2025-01-05": 2, "2025-01-06": 2, "2025-01-07": 3, "2025-01-08": 7, "2025-01-13": 1, "2025-01-14": 3, "2025-01-15": 1, "2025-01-17": 1, "2025-01-19": 5, "2025-01-20": 4, "2025-01-22": 1, "2025-01-26": 2, "2025-01-27": 11, "2025-01-28": 1, "2025-01-29": 2, "2025-02-02": 2, ...
class ContributionHeatmap(gr.HTML): """Reusable GitHub-style contribution heatmap built on gr.HTML.""" def __init__(self, value=None, year=2025, theme="green", c0=None, c1=None, c2=None, c3=None, c4=None, **kwargs): if value is None: value = {} # Use explicit c0-c4 ...
https://huggingface.co/spaces/ysharma/github-contribution-heatmap
spin-wheel
Spin Wheel
Spin the wheel to win a prize!
ysharma
[]
display
"\n<div class=\"wheel-container\">\n <div class=\"wheel-wrapper\">\n <!-- Pointer -->\n (...TRUNCATED)
"\n .wheel-container {\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Robot(...TRUNCATED)
"\n const container = element.querySelector('.wheel-container');\n const wheel = element.query(...TRUNCATED)
"{\"value\": \"\", \"segments_json\": \"[{\\\"label\\\": \\\"\\\\ud83c\\\\udf81 Grand Prize\\\", \\\(...TRUNCATED)
null
"class SpinWheel(gr.HTML):\n \"\"\"\n An interactive prize wheel component with:\n - Smooth(...TRUNCATED)
null
star-rating
Star Rating
Click stars to set a rating from 1 to 5
gradio
["input", "rating", "stars"]
input
"<h2>${label} rating:</h2>\n${Array.from({length: 5}, (_, i) => `<img class='${i < value ? '' : 'fad(...TRUNCATED)
"img { height: 50px; display: inline-block; cursor: pointer; }\n.faded { filter: grayscale(100%); op(...TRUNCATED)
"const imgs = element.querySelectorAll('img');\nimgs.forEach((img, index) => {\n img.addEventList(...TRUNCATED)
{"value": 3, "label": "Food"}
null
"class StarRating(gr.HTML):\n def __init__(self, label, value=0, **kwargs):\n html_templat(...TRUNCATED)
null
button-set
Button Set
Multiple buttons that trigger events with click data
gradio
["input", "buttons", "events"]
input
<button id='A'>A</button> <button id='B'>B</button> <button id='C'>C</button>
"button {\n padding: 10px 20px;\n background-color: #f97316;\n color: white;\n border: n(...TRUNCATED)
"const buttons = element.querySelectorAll('button');\nbuttons.forEach(button => {\n button.addEve(...TRUNCATED)
{}
null
"button_set = gr.HTML(\n html_template=\"\"\"\n <button id='A'>A</button>\n <button id='B'>(...TRUNCATED)
null
progress-bar
Progress Bar
Interactive progress bar - click the track to set progress
gradio
["display", "progress", "animation"]
display
"<div class=\"progress-container\">\n <div class=\"progress-label\">${label}</div>\n <div clas(...TRUNCATED)
".progress-container { padding: 8px 0; }\n.progress-label { font-weight: 600; margin-bottom: 8px; fo(...TRUNCATED)
"const track = element.querySelector('.progress-track');\ntrack.addEventListener('click', (e) => {\n(...TRUNCATED)
{"value": 65, "label": "Upload Progress"}
null
"progress = gr.HTML(\n value=65,\n label=\"Upload Progress\",\n html_template=\"\"\"\n <(...TRUNCATED)
null
likert-scale
Likert Scale
Agreement scale from Strongly Disagree to Strongly Agree
gradio
["input", "survey", "scale"]
input
"<div class=\"likert-container\">\n <div class=\"likert-question\">${question}</div>\n <div cl(...TRUNCATED)
".likert-container { padding: 8px 0; }\n.likert-question { font-weight: 600; margin-bottom: 16px; fo(...TRUNCATED)
"const radios = element.querySelectorAll('input[type=\"radio\"]');\nradios.forEach(radio => {\n r(...TRUNCATED)
{"value": 0, "question": "This component is easy to use"}
null
"class LikertScale(gr.HTML):\n def __init__(self, question=\"Rate this item\", value=0, **kwargs)(...TRUNCATED)
null
tag-input
Tag Input
Add and remove tags with keyboard input
gradio
["input", "tags", "text"]
input
"<div class=\"tag-input-container\">\n <div class=\"tag-list\">\n ${(value || []).map((tag(...TRUNCATED)
".tag-input-container { padding: 4px 0; }\n.tag-list { display: flex; flex-wrap: wrap; gap: 6px; ali(...TRUNCATED)
"const input = element.querySelector('.tag-text-input');\ninput.addEventListener('keydown', (e) => {(...TRUNCATED)
{"value": ["python", "gradio", "html"]}
null
"class TagInput(gr.HTML):\n def __init__(self, value=None, **kwargs):\n html_template = \"(...TRUNCATED)
null
colored-checkbox-group
Colored Checkbox Group
Multi-select checkbox group with custom colors per option
gradio
["input", "checkbox", "color"]
input
"<div class=\"colored-checkbox-container\">\n ${label ? `<label class=\"container-label\">${label(...TRUNCATED)
".colored-checkbox-container { border: 1px solid #e5e7eb; border-radius: 12px; padding: 16px; }\n.co(...TRUNCATED)
"const checkboxes = element.querySelectorAll('input[type=\"checkbox\"]');\ncheckboxes.forEach(checkb(...TRUNCATED)
"{\"value\": [], \"choices\": [\"Apple\", \"Banana\", \"Cherry\"], \"colors\": [\"#dc2626\", \"#eab3(...TRUNCATED)
null
"class ColoredCheckboxGroup(gr.HTML):\n def __init__(self, choices, *, value=None, colors, label=(...TRUNCATED)
null
End of preview. Expand in Data Studio

No dataset card yet

Downloads last month
11