run
#1
by yufeixiao - opened
Files changed (22)
- .gitattributesAdded+35
- .gitignoreDeleted-8
- DockerfileDeleted-24
- README.md+10-8
- app.pyAdded+7
- build/asset-manifest.jsonDeleted-15
- build/favicon.icoDeleted
- build/index.htmlDeleted-1
- build/logo192.pngDeleted
- build/logo512.pngDeleted
- build/manifest.jsonDeleted-25
- build/robots.txtDeleted-3
- build/static/css/main.818486d5.cssDeleted-4
- build/static/css/main.818486d5.css.mapDeleted-1
- build/static/js/453.01567968.chunk.jsDeleted-2
- build/static/js/453.01567968.chunk.js.mapDeleted-1
- build/static/js/main.0fc9e4c2.jsDeleted
- build/static/js/main.0fc9e4c2.js.LICENSE.txtDeleted-56
- build/static/js/main.0fc9e4c2.js.mapDeleted
- main.pyDeleted-134
- music_visualizer.tsxAdded+372
- requirements.txtDeleted-4
1234567891011121314151617181920212223242526272829303132333435*.7z filter=lfs diff=lfs merge=lfs -text*.arrow filter=lfs diff=lfs merge=lfs -text*.bin filter=lfs diff=lfs merge=lfs -text*.bz2 filter=lfs diff=lfs merge=lfs -text*.ckpt filter=lfs diff=lfs merge=lfs -text*.ftz filter=lfs diff=lfs merge=lfs -text*.gz filter=lfs diff=lfs merge=lfs -text*.h5 filter=lfs diff=lfs merge=lfs -text*.joblib filter=lfs diff=lfs merge=lfs -text*.lfs.* filter=lfs diff=lfs merge=lfs -text*.mlmodel filter=lfs diff=lfs merge=lfs -text*.model filter=lfs diff=lfs merge=lfs -text*.msgpack filter=lfs diff=lfs merge=lfs -text*.npy filter=lfs diff=lfs merge=lfs -text*.npz filter=lfs diff=lfs merge=lfs -text*.onnx filter=lfs diff=lfs merge=lfs -text*.ot filter=lfs diff=lfs merge=lfs -text*.parquet filter=lfs diff=lfs merge=lfs -text*.pb filter=lfs diff=lfs merge=lfs -text*.pickle filter=lfs diff=lfs merge=lfs -text*.pkl filter=lfs diff=lfs merge=lfs -text*.pt filter=lfs diff=lfs merge=lfs -text*.pth filter=lfs diff=lfs merge=lfs -text*.rar filter=lfs diff=lfs merge=lfs -text*.safetensors filter=lfs diff=lfs merge=lfs -textsaved_model/**/* filter=lfs diff=lfs merge=lfs -text*.tar.* filter=lfs diff=lfs merge=lfs -text*.tar filter=lfs diff=lfs merge=lfs -text*.tflite filter=lfs diff=lfs merge=lfs -text*.tgz filter=lfs diff=lfs merge=lfs -text*.wasm filter=lfs diff=lfs merge=lfs -text*.xz filter=lfs diff=lfs merge=lfs -text*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -text12345678.venv/*.pyc__pycache__/# Ignore the .env file if it exists.env# Ignore the .vscode directory if it exists.vscode/notes.md123456789101112131415161718192021222324# Use official Python imageFROM python:3.10
# Create a user to match HF's envRUN useradd -m -u 1000 userUSER userENV PATH="/home/user/.local/bin:${PATH}"
# Set the working directoryWORKDIR /app
# Copy requirements and install# We use --user to install in the user's home directoryCOPY --chown=user ./requirements.txt /app/requirements.txtRUN pip install --no-cache-dir --user --upgrade -r /app/requirements.txt
# Copy all files COPY --chown=user . .
# Expose the portEXPOSE 7860
# Start uvicornCMD ["python3", "-m", "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]12345678910111213---title: Frequenceemoji: 🎵colorFrom: indigocolorTo: purplesdk: dockerapp_port: 7860---# Frequence: AI-Powered Music VisualizerBuilt for the Lablab AI AMD Developer Hackathon.Backend: AMD MI300X (via Ngrok)Frontend: React + FastAPI123456789101112131415---title: Frequenceemoji: 😻colorFrom: indigocolorTo: indigosdk: gradiosdk_version: 6.14.0python_version: '3.13'app_file: app.pypinned: falselicense: mitshort_description: Agentic music visualizer---Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
1234567import gradio as gr
def greet(name): return "Hello " + name + "!!"
demo = gr.Interface(fn=greet, inputs="text", outputs="text")demo.launch()123456789101112131415{ "files": { "main.css": "/static/css/main.818486d5.css", "main.js": "/static/js/main.0fc9e4c2.js", "static/js/453.01567968.chunk.js": "/static/js/453.01567968.chunk.js", "index.html": "/index.html", "main.818486d5.css.map": "/static/css/main.818486d5.css.map", "main.0fc9e4c2.js.map": "/static/js/main.0fc9e4c2.js.map", "453.01567968.chunk.js.map": "/static/js/453.01567968.chunk.js.map" }, "entrypoints": [ "static/css/main.818486d5.css", "static/js/main.0fc9e4c2.js" ]}1<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>React App</title><script defer="defer" src="/static/js/main.0fc9e4c2.js"></script><link href="/static/css/main.818486d5.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>12345678910111213141516171819202122232425{ "short_name": "React App", "name": "Create React App Sample", "icons": [ { "src": "favicon.ico", "sizes": "64x64 32x32 24x24 16x16", "type": "image/x-icon" }, { "src": "logo192.png", "type": "image/png", "sizes": "192x192" }, { "src": "logo512.png", "type": "image/png", "sizes": "512x512" } ], "start_url": ".", "display": "standalone", "theme_color": "#000000", "background_color": "#ffffff"}123# https://www.robotstxt.org/robotstxt.htmlUser-agent: *Disallow:1234*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:initial;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:initial}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}:root{--background:240 10% 3.9%;--foreground:0 0% 98%;--card:240 10% 3.9%;--card-foreground:0 0% 98%;--popover:240 10% 3.9%;--popover-foreground:0 0% 98%;--primary:0 0% 98%;--primary-foreground:240 5.9% 10%;--secondary:240 3.7% 15.9%;--secondary-foreground:0 0% 98%;--muted:240 3.7% 15.9%;--muted-foreground:240 5% 64.9%;--accent:240 3.7% 15.9%;--accent-foreground:0 0% 98%;--destructive:0 62.8% 30.6%;--destructive-foreground:0 0% 98%;--border:240 3.7% 15.9%;--input:240 3.7% 15.9%;--ring:240 4.9% 83.9%;--radius:0.5rem}#root,body,html{background-color:#09090b;background-color:hsl(var(--background));color:#fafafa;color:hsl(var(--foreground));height:100vh;inset:0;margin:0;overflow:hidden;padding:0;position:fixed;width:100vw}*{border-color:#27272a;border-color:hsl(var(--border))}.sr-only{clip:rect(0,0,0,0);border-width:0;height:1px;margin:-1px;overflow:hidden;padding:0;white-space:nowrap;width:1px}.absolute,.sr-only{position:absolute}.relative{position:relative}.inset-0{inset:0}.my-2{margin-bottom:.5rem;margin-top:.5rem}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.ml-3{margin-left:.75rem}.ml-auto{margin-left:auto}.mr-3{margin-right:.75rem}.mt-2{margin-top:.5rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.hidden{display:none}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-full{height:100%}.h-screen{height:100vh}.w-1\.5{width:.375rem}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-52{width:13rem}.w-56{width:14rem}.w-7{width:1.75rem}.w-9{width:2.25rem}.w-full{width:100%}.flex-1{flex:1 1}.flex-shrink-0{flex-shrink:0}.translate-x-0{--tw-translate-x:0px}.translate-x-0,.translate-x-1{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-1{--tw-translate-x:0.25rem}.translate-x-4{--tw-translate-x:1rem}.translate-x-4,.translate-x-5{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-5{--tw-translate-x:1.25rem}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-pointer{cursor:pointer}.resize{resize:both}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.25rem*var(--tw-space-y-reverse));margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.75rem*var(--tw-space-y-reverse));margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-gray-300{--tw-border-opacity:1;border-color:#d1d5db;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.border-transparent{border-color:#0000}.border-violet-400\/30{border-color:#a78bfa4d}.border-violet-500\/20{border-color:#8b5cf633}.border-violet-500\/30{border-color:#8b5cf64d}.border-zinc-700{--tw-border-opacity:1;border-color:#3f3f46;border-color:rgb(63 63 70/var(--tw-border-opacity,1))}.border-zinc-800{--tw-border-opacity:1;border-color:#27272a;border-color:rgb(39 39 42/var(--tw-border-opacity,1))}.bg-\[\#09090b\]{--tw-bg-opacity:1;background-color:#09090b;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.bg-\[\#0c0c10\]{--tw-bg-opacity:1;background-color:#0c0c10;background-color:rgb(12 12 16/var(--tw-bg-opacity,1))}.bg-black{--tw-bg-opacity:1;background-color:#000;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.bg-blue-600{--tw-bg-opacity:1;background-color:#2563eb;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}.bg-emerald-400{--tw-bg-opacity:1;background-color:#34d399;background-color:rgb(52 211 153/var(--tw-bg-opacity,1))}.bg-gray-300{--tw-bg-opacity:1;background-color:#d1d5db;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.bg-violet-500\/15{background-color:#8b5cf626}.bg-violet-600{--tw-bg-opacity:1;background-color:#7c3aed;background-color:rgb(124 58 237/var(--tw-bg-opacity,1))}.bg-white{--tw-bg-opacity:1;background-color:#fff;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bg-zinc-600{--tw-bg-opacity:1;background-color:#52525b;background-color:rgb(82 82 91/var(--tw-bg-opacity,1))}.bg-zinc-700{--tw-bg-opacity:1;background-color:#3f3f46;background-color:rgb(63 63 70/var(--tw-bg-opacity,1))}.bg-zinc-900{--tw-bg-opacity:1;background-color:#18181b;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.p-0{padding:0}.p-2{padding:.5rem}.p-3{padding:.75rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-0{padding-bottom:0;padding-top:0}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-1\.5{padding-bottom:.375rem;padding-top:.375rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.pb-4{padding-bottom:1rem}.text-center{text-align:center}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[9px\]{font-size:9px}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.leading-relaxed{line-height:1.625}.tracking-tight{letter-spacing:-.025em}.tracking-widest{letter-spacing:.1em}.text-violet-200{--tw-text-opacity:1;color:#ddd6fe;color:rgb(221 214 254/var(--tw-text-opacity,1))}.text-violet-300{--tw-text-opacity:1;color:#c4b5fd;color:rgb(196 181 253/var(--tw-text-opacity,1))}.text-violet-400{--tw-text-opacity:1;color:#a78bfa;color:rgb(167 139 250/var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:#fff;color:rgb(255 255 255/var(--tw-text-opacity,1))}.text-zinc-300{--tw-text-opacity:1;color:#d4d4d8;color:rgb(212 212 216/var(--tw-text-opacity,1))}.text-zinc-400{--tw-text-opacity:1;color:#a1a1aa;color:rgb(161 161 170/var(--tw-text-opacity,1))}.opacity-0{opacity:0}.opacity-70{opacity:.7}.shadow{--tw-shadow:0 1px 3px 0 #0000001a,0 1px 2px -1px #0000001a;--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-\[0_0_6px_rgba\(52\2c 211\2c 153\2c 0\.8\)\]{box-shadow:0 0 #0000,0 0 #0000,var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-\[0_0_6px_rgba\(52\2c 211\2c 153\2c 0\.8\)\]{--tw-shadow:0 0 6px #34d399cc;--tw-shadow-colored:0 0 6px var(--tw-shadow-color)}.outline-none{outline:2px solid #0000;outline-offset:2px}.outline{outline-style:solid}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,fill,stroke,-webkit-text-decoration-color;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,-webkit-text-decoration-color;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-transform{transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-200{transition-duration:.2s}.placeholder\:text-zinc-600::placeholder{--tw-text-opacity:1;color:#52525b;color:rgb(82 82 91/var(--tw-text-opacity,1))}.hover\:border-violet-500\/50:hover{border-color:#8b5cf680}.hover\:border-zinc-500:hover{--tw-border-opacity:1;border-color:#71717a;border-color:rgb(113 113 122/var(--tw-border-opacity,1))}.hover\:bg-violet-500:hover{--tw-bg-opacity:1;background-color:#8b5cf6;background-color:rgb(139 92 246/var(--tw-bg-opacity,1))}.hover\:bg-violet-500\/5:hover{background-color:#8b5cf60d}.hover\:bg-zinc-800:hover{--tw-bg-opacity:1;background-color:#27272a;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.focus\:border-violet-500\/50:focus{border-color:#8b5cf680}/*# sourceMappingURL=main.818486d5.css.map*/1{"version":3,"file":"static/css/main.818486d5.css","mappings":"AAAA,wCAAc,CAAd,uBAAc,CAAd,kBAAc,CAAd,kBAAc,CAAd,aAAc,CAAd,aAAc,CAAd,aAAc,CAAd,cAAc,CAAd,cAAc,CAAd,YAAc,CAAd,YAAc,CAAd,iBAAc,CAAd,qCAAc,CAAd,6BAAc,CAAd,4BAAc,CAAd,2BAAc,CAAd,cAAc,CAAd,mBAAc,CAAd,qBAAc,CAAd,sBAAc,CAAd,uBAAc,CAAd,iBAAc,CAAd,0BAAc,CAAd,2BAAc,CAAd,yBAAc,CAAd,iCAAc,CAAd,0BAAc,CAAd,qBAAc,CAAd,6BAAc,CAAd,WAAc,CAAd,iBAAc,CAAd,eAAc,CAAd,gBAAc,CAAd,iBAAc,CAAd,aAAc,CAAd,eAAc,CAAd,YAAc,CAAd,kBAAc,CAAd,oBAAc,CAAd,0BAAc,CAAd,wBAAc,CAAd,yBAAc,CAAd,0BAAc,CAAd,sBAAc,CAAd,uBAAc,CAAd,wBAAc,CAAd,qBAAc,CAAd,mBAAc,CAAd,qBAAc,CAAd,oBAAc,CAAd,oBAAc,CAAd,kCAAc,CAAd,uBAAc,CAAd,kBAAc,CAAd,kBAAc,CAAd,aAAc,CAAd,aAAc,CAAd,aAAc,CAAd,cAAc,CAAd,cAAc,CAAd,YAAc,CAAd,YAAc,CAAd,iBAAc,CAAd,qCAAc,CAAd,6BAAc,CAAd,4BAAc,CAAd,2BAAc,CAAd,cAAc,CAAd,mBAAc,CAAd,qBAAc,CAAd,sBAAc,CAAd,uBAAc,CAAd,iBAAc,CAAd,0BAAc,CAAd,2BAAc,CA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CAAnB,kDAAmB,CAAnB,qCAAmB,CAFnB,4DAiDC,CAjDD,aAiDC,CAjDD,4CAiDC,CAjDD,0DAiDC,CAjDD,mDAiDC,CAjDD,oBAiDC,CAjDD,wDAiDC,CAjDD,6CAiDC,CAjDD,wBAiDC,CAjDD,uDAiDC,CAjDD,yDAiDC,CAjDD,2CAiDC,CAjDD,wBAiDC,CAjDD,qDAiDC,CAjDD,0DAiDC","sources":["index.css"],"sourcesContent":["@tailwind base;\n@tailwind components;\n@tailwind utilities;\n\n@layer base {\n :root {\n /* Complete Shadcn Dark Mode Palette */\n --background: 240 10% 3.9%;\n --foreground: 0 0% 98%;\n --card: 240 10% 3.9%;\n --card-foreground: 0 0% 98%;\n --popover: 240 10% 3.9%;\n --popover-foreground: 0 0% 98%;\n --primary: 0 0% 98%;\n --primary-foreground: 240 5.9% 10%;\n --secondary: 240 3.7% 15.9%;\n --secondary-foreground: 0 0% 98%;\n --muted: 240 3.7% 15.9%;\n --muted-foreground: 240 5% 64.9%;\n --accent: 240 3.7% 15.9%;\n --accent-foreground: 0 0% 98%;\n --destructive: 0 62.8% 30.6%;\n --destructive-foreground: 0 0% 98%;\n --border: 240 3.7% 15.9%;\n --input: 240 3.7% 15.9%;\n --ring: 240 4.9% 83.9%;\n --radius: 0.5rem;\n }\n\n /* \n * THE VAULT DOOR: \n * This permanently locks the app to the viewport.\n * No accidental scrolling, no black voids.\n */\n html, body, #root {\n position: fixed;\n inset: 0;\n margin: 0;\n padding: 0;\n width: 100vw;\n height: 100vh;\n background-color: hsl(var(--background));\n color: hsl(var(--foreground));\n overflow: hidden;\n }\n \n * {\n border-color: hsl(var(--border));\n }\n}"],"names":[],"sourceRoot":""}12"use strict";(self.webpackChunkvisualizer=self.webpackChunkvisualizer||[]).push([[453],{453(e,t,n){n.d(t,{getCLS:()=>y,getFCP:()=>g,getFID:()=>C,getLCP:()=>P,getTTFB:()=>D});var i,r,a,o,u=function(e,t){return{name:e,value:void 0===t?-1:t,delta:0,entries:[],id:"v2-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12)}},c=function(e,t){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){if("first-input"===e&&!("PerformanceEventTiming"in self))return;var n=new PerformanceObserver(function(e){return e.getEntries().map(t)});return n.observe({type:e,buffered:!0}),n}}catch(e){}},s=function(e,t){var n=function n(i){"pagehide"!==i.type&&"hidden"!==document.visibilityState||(e(i),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},f=function(e){addEventListener("pageshow",function(t){t.persisted&&e(t)},!0)},m=function(e,t,n){var i;return function(r){t.value>=0&&(r||n)&&(t.delta=t.value-(i||0),(t.delta||void 0===i)&&(i=t.value,e(t)))}},v=-1,p=function(){return"hidden"===document.visibilityState?0:1/0},d=function(){s(function(e){var t=e.timeStamp;v=t},!0)},l=function(){return v<0&&(v=p(),d(),f(function(){setTimeout(function(){v=p(),d()},0)})),{get firstHiddenTime(){return v}}},g=function(e,t){var n,i=l(),r=u("FCP"),a=function(e){"first-contentful-paint"===e.name&&(s&&s.disconnect(),e.startTime<i.firstHiddenTime&&(r.value=e.startTime,r.entries.push(e),n(!0)))},o=window.performance&&performance.getEntriesByName&&performance.getEntriesByName("first-contentful-paint")[0],s=o?null:c("paint",a);(o||s)&&(n=m(e,r,t),o&&a(o),f(function(i){r=u("FCP"),n=m(e,r,t),requestAnimationFrame(function(){requestAnimationFrame(function(){r.value=performance.now()-i.timeStamp,n(!0)})})}))},h=!1,T=-1,y=function(e,t){h||(g(function(e){T=e.value}),h=!0);var n,i=function(t){T>-1&&e(t)},r=u("CLS",0),a=0,o=[],v=function(e){if(!e.hadRecentInput){var t=o[0],i=o[o.length-1];a&&e.startTime-i.startTime<1e3&&e.startTime-t.startTime<5e3?(a+=e.value,o.push(e)):(a=e.value,o=[e]),a>r.value&&(r.value=a,r.entries=o,n())}},p=c("layout-shift",v);p&&(n=m(i,r,t),s(function(){p.takeRecords().map(v),n(!0)}),f(function(){a=0,T=-1,r=u("CLS",0),n=m(i,r,t)}))},E={passive:!0,capture:!0},w=new Date,L=function(e,t){i||(i=t,r=e,a=new Date,F(removeEventListener),S())},S=function(){if(r>=0&&r<a-w){var e={entryType:"first-input",name:i.type,target:i.target,cancelable:i.cancelable,startTime:i.timeStamp,processingStart:i.timeStamp+r};o.forEach(function(t){t(e)}),o=[]}},b=function(e){if(e.cancelable){var t=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,t){var n=function(){L(e,t),r()},i=function(){r()},r=function(){removeEventListener("pointerup",n,E),removeEventListener("pointercancel",i,E)};addEventListener("pointerup",n,E),addEventListener("pointercancel",i,E)}(t,e):L(t,e)}},F=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach(function(t){return e(t,b,E)})},C=function(e,t){var n,a=l(),v=u("FID"),p=function(e){e.startTime<a.firstHiddenTime&&(v.value=e.processingStart-e.startTime,v.entries.push(e),n(!0))},d=c("first-input",p);n=m(e,v,t),d&&s(function(){d.takeRecords().map(p),d.disconnect()},!0),d&&f(function(){var a;v=u("FID"),n=m(e,v,t),o=[],r=-1,i=null,F(addEventListener),a=p,o.push(a),S()})},k={},P=function(e,t){var n,i=l(),r=u("LCP"),a=function(e){var t=e.startTime;t<i.firstHiddenTime&&(r.value=t,r.entries.push(e),n())},o=c("largest-contentful-paint",a);if(o){n=m(e,r,t);var v=function(){k[r.id]||(o.takeRecords().map(a),o.disconnect(),k[r.id]=!0,n(!0))};["keydown","click"].forEach(function(e){addEventListener(e,v,{once:!0,capture:!0})}),s(v,!0),f(function(i){r=u("LCP"),n=m(e,r,t),requestAnimationFrame(function(){requestAnimationFrame(function(){r.value=performance.now()-i.timeStamp,k[r.id]=!0,n(!0)})})})}},D=function(e){var t,n=u("TTFB");t=function(){try{var t=performance.getEntriesByType("navigation")[0]||function(){var e=performance.timing,t={entryType:"navigation",startTime:0};for(var n in e)"navigationStart"!==n&&"toJSON"!==n&&(t[n]=Math.max(e[n]-e.navigationStart,0));return t}();if(n.value=n.delta=t.responseStart,n.value<0||n.value>performance.now())return;n.entries=[t],e(n)}catch(e){}},"complete"===document.readyState?setTimeout(t,0):addEventListener("load",function(){return setTimeout(t,0)})}}}]);//# sourceMappingURL=453.01567968.chunk.js.map1{"version":3,"file":"static/js/453.01567968.chunk.js","mappings":"8KAAA,IAAIA,EAAEC,EAAEC,EAAEC,EAAEC,EAAE,SAASJ,EAAEC,GAAG,MAAM,CAACI,KAAKL,EAAEM,WAAW,IAAIL,GAAG,EAAEA,EAAEM,MAAM,EAAEC,QAAQ,GAAGC,GAAG,MAAMC,OAAOC,KAAKC,MAAM,KAAKF,OAAOG,KAAKC,MAAM,cAAcD,KAAKE,UAAU,MAAM,EAAEC,EAAE,SAAShB,EAAEC,GAAG,IAAI,GAAGgB,oBAAoBC,oBAAoBC,SAASnB,GAAG,CAAC,GAAG,gBAAgBA,KAAK,2BAA2BoB,MAAM,OAAO,IAAIlB,EAAE,IAAIe,oBAAqB,SAASjB,GAAG,OAAOA,EAAEqB,aAAaC,IAAIrB,EAAE,GAAI,OAAOC,EAAEqB,QAAQ,CAACC,KAAKxB,EAAEyB,UAAS,IAAKvB,CAAC,CAAC,CAAC,MAAMF,GAAG,CAAC,EAAE0B,EAAE,SAAS1B,EAAEC,GAAG,IAAIC,EAAE,SAASA,EAAEC,GAAG,aAAaA,EAAEqB,MAAM,WAAWG,SAASC,kBAAkB5B,EAAEG,GAAGF,IAAI4B,oBAAoB,mBAAmB3B,GAAE,GAAI2B,oBAAoB,WAAW3B,GAAE,IAAK,EAAE4B,iBAAiB,mBAAmB5B,GAAE,GAAI4B,iBAAiB,WAAW5B,GAAE,EAAG,EAAE6B,EAAE,SAAS/B,GAAG8B,iBAAiB,WAAY,SAAS7B,GAAGA,EAAE+B,WAAWhC,EAAEC,EAAE,GAAG,EAAG,EAAEgC,EAAE,SAASjC,EAAEC,EAAEC,GAAG,IAAIC,E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EAAE4E,gBAAgB,IAAI,OAAO3E,CAAC,CAAjL,GAAqL,GAAGC,EAAEI,MAAMJ,EAAEK,MAAMN,EAAE4E,cAAc3E,EAAEI,MAAM,GAAGJ,EAAEI,MAAMwC,YAAYlC,MAAM,OAAOV,EAAEM,QAAQ,CAACP,GAAGD,EAAEE,EAAE,CAAC,MAAMF,GAAG,CAAC,EAAE,aAAa2B,SAASmD,WAAWvC,WAAWtC,EAAE,GAAG6B,iBAAiB,OAAQ,WAAW,OAAOS,WAAWtC,EAAE,EAAE,EAAG","sources":["../node_modules/web-vitals/dist/web-vitals.js"],"sourcesContent":["var e,t,n,i,r=function(e,t){return{name:e,value:void 0===t?-1:t,delta:0,entries:[],id:\"v2-\".concat(Date.now(),\"-\").concat(Math.floor(8999999999999*Math.random())+1e12)}},a=function(e,t){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){if(\"first-input\"===e&&!(\"PerformanceEventTiming\"in self))return;var n=new PerformanceObserver((function(e){return e.getEntries().map(t)}));return n.observe({type:e,buffered:!0}),n}}catch(e){}},o=function(e,t){var n=function n(i){\"pagehide\"!==i.type&&\"hidden\"!==document.visibilityState||(e(i),t&&(removeEventListener(\"visibilitychange\",n,!0),removeEventListener(\"pagehide\",n,!0)))};addEventListener(\"visibilitychange\",n,!0),addEventListener(\"pagehide\",n,!0)},u=function(e){addEventListener(\"pageshow\",(function(t){t.persisted&&e(t)}),!0)},c=function(e,t,n){var i;return function(r){t.value>=0&&(r||n)&&(t.delta=t.value-(i||0),(t.delta||void 0===i)&&(i=t.value,e(t)))}},f=-1,s=function(){return\"hidden\"===document.visibilityState?0:1/0},m=function(){o((function(e){var t=e.timeStamp;f=t}),!0)},v=function(){return f<0&&(f=s(),m(),u((function(){setTimeout((function(){f=s(),m()}),0)}))),{get firstHiddenTime(){return f}}},d=function(e,t){var n,i=v(),o=r(\"FCP\"),f=function(e){\"first-contentful-paint\"===e.name&&(m&&m.disconnect(),e.startTime<i.firstHiddenTime&&(o.value=e.startTime,o.entries.push(e),n(!0)))},s=window.performance&&performance.getEntriesByName&&performance.getEntriesByName(\"first-contentful-paint\")[0],m=s?null:a(\"paint\",f);(s||m)&&(n=c(e,o,t),s&&f(s),u((function(i){o=r(\"FCP\"),n=c(e,o,t),requestAnimationFrame((function(){requestAnimationFrame((function(){o.value=performance.now()-i.timeStamp,n(!0)}))}))})))},p=!1,l=-1,h=function(e,t){p||(d((function(e){l=e.value})),p=!0);var n,i=function(t){l>-1&&e(t)},f=r(\"CLS\",0),s=0,m=[],v=function(e){if(!e.hadRecentInput){var t=m[0],i=m[m.length-1];s&&e.startTime-i.startTime<1e3&&e.startTime-t.startTime<5e3?(s+=e.value,m.push(e)):(s=e.value,m=[e]),s>f.value&&(f.value=s,f.entries=m,n())}},h=a(\"layout-shift\",v);h&&(n=c(i,f,t),o((function(){h.takeRecords().map(v),n(!0)})),u((function(){s=0,l=-1,f=r(\"CLS\",0),n=c(i,f,t)})))},T={passive:!0,capture:!0},y=new Date,g=function(i,r){e||(e=r,t=i,n=new Date,w(removeEventListener),E())},E=function(){if(t>=0&&t<n-y){var r={entryType:\"first-input\",name:e.type,target:e.target,cancelable:e.cancelable,startTime:e.timeStamp,processingStart:e.timeStamp+t};i.forEach((function(e){e(r)})),i=[]}},S=function(e){if(e.cancelable){var t=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;\"pointerdown\"==e.type?function(e,t){var n=function(){g(e,t),r()},i=function(){r()},r=function(){removeEventListener(\"pointerup\",n,T),removeEventListener(\"pointercancel\",i,T)};addEventListener(\"pointerup\",n,T),addEventListener(\"pointercancel\",i,T)}(t,e):g(t,e)}},w=function(e){[\"mousedown\",\"keydown\",\"touchstart\",\"pointerdown\"].forEach((function(t){return e(t,S,T)}))},L=function(n,f){var s,m=v(),d=r(\"FID\"),p=function(e){e.startTime<m.firstHiddenTime&&(d.value=e.processingStart-e.startTime,d.entries.push(e),s(!0))},l=a(\"first-input\",p);s=c(n,d,f),l&&o((function(){l.takeRecords().map(p),l.disconnect()}),!0),l&&u((function(){var a;d=r(\"FID\"),s=c(n,d,f),i=[],t=-1,e=null,w(addEventListener),a=p,i.push(a),E()}))},b={},F=function(e,t){var n,i=v(),f=r(\"LCP\"),s=function(e){var t=e.startTime;t<i.firstHiddenTime&&(f.value=t,f.entries.push(e),n())},m=a(\"largest-contentful-paint\",s);if(m){n=c(e,f,t);var d=function(){b[f.id]||(m.takeRecords().map(s),m.disconnect(),b[f.id]=!0,n(!0))};[\"keydown\",\"click\"].forEach((function(e){addEventListener(e,d,{once:!0,capture:!0})})),o(d,!0),u((function(i){f=r(\"LCP\"),n=c(e,f,t),requestAnimationFrame((function(){requestAnimationFrame((function(){f.value=performance.now()-i.timeStamp,b[f.id]=!0,n(!0)}))}))}))}},P=function(e){var t,n=r(\"TTFB\");t=function(){try{var t=performance.getEntriesByType(\"navigation\")[0]||function(){var e=performance.timing,t={entryType:\"navigation\",startTime:0};for(var n in e)\"navigationStart\"!==n&&\"toJSON\"!==n&&(t[n]=Math.max(e[n]-e.navigationStart,0));return t}();if(n.value=n.delta=t.responseStart,n.value<0||n.value>performance.now())return;n.entries=[t],e(n)}catch(e){}},\"complete\"===document.readyState?setTimeout(t,0):addEventListener(\"load\",(function(){return setTimeout(t,0)}))};export{h as getCLS,d as getFCP,L as getFID,F as getLCP,P as getTTFB};\n"],"names":["e","t","n","i","r","name","value","delta","entries","id","concat","Date","now","Math","floor","random","a","PerformanceObserver","supportedEntryTypes","includes","self","getEntries","map","observe","type","buffered","o","document","visibilityState","removeEventListener","addEventListener","u","persisted","c","f","s","m","timeStamp","v","setTimeout","firstHiddenTime","d","disconnect","startTime","push","window","performance","getEntriesByName","requestAnimationFrame","p","l","h","hadRecentInput","length","takeRecords","T","passive","capture","y","g","w","E","entryType","target","cancelable","processingStart","forEach","S","L","b","F","once","P","getEntriesByType","timing","max","navigationStart","responseStart","readyState"],"sourceRoot":""}1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556/** * @license React * react-dom-client.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */
/** * @license React * react-dom.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */
/** * @license React * react-jsx-runtime.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */
/** * @license React * react.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */
/** * @license React * scheduler.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */
/** * @license lucide-react v1.14.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134from fastapi import FastAPIfrom fastapi.middleware.cors import CORSMiddlewarefrom fastapi.staticfiles import StaticFilesfrom pydantic import BaseModelfrom openai import AsyncOpenAIimport jsonimport osimport re
app = FastAPI()
app.add_middleware( CORSMiddleware, allow_origins=["*"], allow_methods=["*"], allow_headers=["*"],)
vllm_url = os.getenv("NGROK_URL")
client = AsyncOpenAI( base_url=vllm_url, api_key="empty" )
class VisualizerRequest(BaseModel): user_prompt: str current_state: dict
def clean_json_response(raw_text: str) -> str: """Clean and extract JSON from AI response""" text = re.sub(r'```json\s*', '', raw_text) text = re.sub(r'```\s*', '', text) # Try to find JSON object json_match = re.search(r'\{.*\}', text, re.DOTALL) if json_match: return json_match.group(0) return text.strip()
@app.post("/generate_visuals")async def generate_visuals(payload: VisualizerRequest): current = payload.current_state system_prompt = f"""You are an AI visual DJ controlling a music visualizer.The user describes a vibe or gives a command, and you output JSON parameters to match it.
CRITICAL: Respond with ONLY a valid JSON object. No markdown, no explanations, no extra text.
Available styles: "abstract", "waveform", "bars", "particles"
Current state:{json.dumps(current, indent=2)}
Output JSON must include ALL these fields (modify only what the user requested, keep others from current state):{{ "style": "abstract", "colorA": "#hexcode", "colorB": "#hexcode", "speed": 1.0, "intensity": 1.0, "complexity": 0.5, "smoothing": 0.8, "particleCount": 120, "barCount": 64, "mirror": false, "rotation": false, "glow": false, "message": "Short confirmation of what changed"}}
Examples:- "make it aggressive" → increase speed to 2.5, intensity to 2.8, use reds/oranges- "warm sunset palette" → colorA: "#ff6b35", colorB: "#f7931e"- "switch to particles" → style: "particles"- "mirror mode on" → mirror: true- "slow it down" → speed: 0.5"""
try: response = await client.chat.completions.create( model="Qwen/Qwen2.5-7B-Instruct", messages=[ {"role": "system", "content": system_prompt}, {"role": "user", "content": payload.user_prompt} ], temperature=0.7, max_tokens=500 ) raw_output = response.choices[0].message.content clean_json = clean_json_response(raw_output) ai_response = json.loads(clean_json) # Extract style and message style = ai_response.get("style", current.get("style", "bars")) message = ai_response.get("message", "Updated!") # Build params dict with all required fields params = { "colorA": ai_response.get("colorA", current.get("colorA", "#7f77dd")), "colorB": ai_response.get("colorB", current.get("colorB", "#1d9e75")), "speed": float(ai_response.get("speed", current.get("speed", 1.0))), "intensity": float(ai_response.get("intensity", current.get("intensity", 1.0))), "complexity": float(ai_response.get("complexity", current.get("complexity", 0.5))), "smoothing": float(ai_response.get("smoothing", current.get("smoothing", 0.8))), "particleCount": int(ai_response.get("particleCount", current.get("particleCount", 120))), "barCount": int(ai_response.get("barCount", current.get("barCount", 64))), "mirror": bool(ai_response.get("mirror", current.get("mirror", False))), "rotation": bool(ai_response.get("rotation", current.get("rotation", False))), "glow": bool(ai_response.get("glow", current.get("glow", False))), } # Return in format expected by frontend return { "style": style, "params": params, "message": message } except Exception as e: print(f"AI Error: {e}") return { "style": current.get("style", "bars"), "params": current, "message": f"AI error: {str(e)[:50]}. Try rephrasing?" }
@app.get("/health")async def health(): return {"status": "Backend is alive", "ai_model": "Phase 2 - AMD MI300X Qwen"}
app.mount("/", StaticFiles(directory="build", html=True), name="static")123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372import { useState, useEffect, useRef, useCallback } from "react";import { Mic, MicOff, Play, Pause, RotateCcw, Upload, Zap, ChevronRight, Music2 } from "lucide-react";import { Badge } from "@/components/ui/badge";import { Button } from "@/components/ui/button";import { Slider } from "@/components/ui/slider";import { Switch } from "@/components/ui/switch";import { Separator } from "@/components/ui/separator";import { ScrollArea } from "@/components/ui/scroll-area";import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs";import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip";
const STYLES = ["abstract","waveform","bars","particles"];const STYLE_LABELS = { abstract:"Abstract", waveform:"Waveform", bars:"Freq Bars", particles:"Particles" };const STYLE_ICONS = { abstract:"◎", waveform:"∿", bars:"▋", particles:"·:·" };
const DEFAULT_PARAMS = { colorA:"#7f77dd", colorB:"#1d9e75", speed:1, intensity:1, complexity:0.5, smoothing:0.8, particleCount:120, barCount:64, rotation:false, mirror:false, glow:false,};
function AudioProgress({ audioElRef, isPlaying }) { const [cur, setCur] = useState(0); const [dur, setDur] = useState(0); useEffect(() => { const el = audioElRef.current; if (!el) return; const onTime = () => setCur(el.currentTime); const onMeta = () => setDur(el.duration); el.addEventListener("timeupdate", onTime); el.addEventListener("loadedmetadata", onMeta); setDur(el.duration || 0); return () => { el.removeEventListener("timeupdate", onTime); el.removeEventListener("loadedmetadata", onMeta); }; }, [isPlaying]); const fmt = s => `${Math.floor(s/60)}:${String(Math.floor(s%60)).padStart(2,"0")}`; return ( <div className="space-y-1 mt-2"> <Slider min={0} max={dur||1} step={0.1} value={[cur]} onValueChange={([v])=>{ if(audioElRef.current) audioElRef.current.currentTime=v; setCur(v); }} className="w-full" /> <div className="flex justify-between text-xs text-muted-foreground"> <span>{fmt(cur)}</span><span>{dur?fmt(dur):"--:--"}</span> </div> </div> );}
export default function App() { const canvasRef = useRef(null); const animRef = useRef(null); const audioCtxRef = useRef(null); const analyserRef = useRef(null); const sourceRef = useRef(null); const streamRef = useRef(null); const audioElRef = useRef(null); const phaseRef = useRef(0); const particlesRef = useRef([]);
const [activeStyle, setActiveStyle] = useState("bars"); const [params, setParams] = useState(DEFAULT_PARAMS); const [inputMode, setInputMode] = useState("file"); const [isPlaying, setIsPlaying] = useState(false); const [fileName, setFileName] = useState(""); const [messages, setMessages] = useState([ { role:"assistant", text:'Hi! I\'m your AI VJ. Try: "make it aggressive", "warm sunset palette", "switch to particles", or "mirror mode on".' } ]); const [chatInput, setChatInput] = useState(""); const [loading, setLoading] = useState(false);
const paramsRef = useRef(params); const activeStyleRef = useRef(activeStyle); useEffect(()=>{ paramsRef.current=params; },[params]); useEffect(()=>{ activeStyleRef.current=activeStyle; },[activeStyle]);
const initAudioCtx = useCallback(()=>{ if(!audioCtxRef.current){ audioCtxRef.current=new(window.AudioContext||window.webkitAudioContext)(); const a=audioCtxRef.current.createAnalyser(); a.fftSize=2048; a.smoothingTimeConstant=paramsRef.current.smoothing; a.connect(audioCtxRef.current.destination); analyserRef.current=a; } },[]);
const stopAll = useCallback(()=>{ if(sourceRef.current){try{sourceRef.current.disconnect();}catch(e){} sourceRef.current=null;} if(streamRef.current){streamRef.current.getTracks().forEach(t=>t.stop()); streamRef.current=null;} if(audioElRef.current){audioElRef.current.pause(); audioElRef.current=null;} setIsPlaying(false); },[]);
const startMic = useCallback(async()=>{ stopAll(); initAudioCtx(); if(audioCtxRef.current.state==="suspended") await audioCtxRef.current.resume(); const stream=await navigator.mediaDevices.getUserMedia({audio:true}); streamRef.current=stream; const src=audioCtxRef.current.createMediaStreamSource(stream); src.connect(analyserRef.current); sourceRef.current=src; setIsPlaying(true); },[stopAll,initAudioCtx]);
const handleFile = useCallback(async(file)=>{ if(!file) return; stopAll(); initAudioCtx(); if(audioCtxRef.current.state==="suspended") await audioCtxRef.current.resume(); setFileName(file.name); const url=URL.createObjectURL(file); const audio=new Audio(url); audio.crossOrigin="anonymous"; audioElRef.current=audio; const src=audioCtxRef.current.createMediaElementSource(audio); src.connect(analyserRef.current); sourceRef.current=src; audio.play(); setIsPlaying(true); audio.onended=()=>setIsPlaying(false); },[stopAll,initAudioCtx]);
useEffect(()=>{ if(analyserRef.current) analyserRef.current.smoothingTimeConstant=params.smoothing; },[params.smoothing]);
useEffect(()=>{ const canvas=canvasRef.current; const ctx=canvas.getContext("2d"); let w,h; const resize=()=>{ w=canvas.width=canvas.offsetWidth; h=canvas.height=canvas.offsetHeight; }; resize(); window.addEventListener("resize",resize); const hexAlpha=(hex,a)=>{ const r=parseInt(hex.slice(1,3),16),g=parseInt(hex.slice(3,5),16),b=parseInt(hex.slice(5,7),16); return `rgba(${r},${g},${b},${Math.max(0,Math.min(1,a))})`; }; const lerpColor=(a,b,t)=>{ const r1=parseInt(a.slice(1,3),16),g1=parseInt(a.slice(3,5),16),b1=parseInt(a.slice(5,7),16),r2=parseInt(b.slice(1,3),16),g2=parseInt(b.slice(3,5),16),b2=parseInt(b.slice(5,7),16); return `#${Math.round(r1+(r2-r1)*t).toString(16).padStart(2,"0")}${Math.round(g1+(g2-g1)*t).toString(16).padStart(2,"0")}${Math.round(b1+(b2-b1)*t).toString(16).padStart(2,"0")}`; }; const initParticles=count=>{ particlesRef.current=Array.from({length:count},()=>({x:Math.random(),y:Math.random(),vx:(Math.random()-.5)*.002,vy:(Math.random()-.5)*.002,size:Math.random()*3+1,life:Math.random()})); }; initParticles(DEFAULT_PARAMS.particleCount); const draw=()=>{ animRef.current=requestAnimationFrame(draw); const p=paramsRef.current; const style=activeStyleRef.current; const analyser=analyserRef.current; phaseRef.current+=.01*p.speed; const phase=phaseRef.current; const dataArr=new Uint8Array(analyser?analyser.frequencyBinCount:1024); const timeArr=new Uint8Array(analyser?analyser.fftSize:2048); if(analyser){analyser.getByteFrequencyData(dataArr);analyser.getByteTimeDomainData(timeArr);} const energy=analyser?dataArr.reduce((a,b)=>a+b,0)/dataArr.length/255:.2; const bass=analyser?dataArr.slice(0,8).reduce((a,b)=>a+b,0)/8/255:.1; ctx.fillStyle="rgba(10,10,14,0.18)"; ctx.fillRect(0,0,w,h); const cA=p.colorA,cB=p.colorB,cx=w/2,cy=h/2; if(style==="abstract"){ const count=Math.floor(3+p.complexity*5); for(let i=0;i<count;i++){ const t=i/count,r=(0.15+bass*.2+p.intensity*.1)*Math.min(w,h); const ang=phase*(1+i*.3)+t*Math.PI*2; const bx=cx+Math.cos(ang)*r*(1+Math.sin(phase*.7+i)*.4),by=cy+Math.sin(ang)*r*(1+Math.cos(phase*.5+i)*.4); const grad=ctx.createRadialGradient(bx,by,0,bx,by,r*.5); grad.addColorStop(0,hexAlpha(cA,.25+energy*.4)); grad.addColorStop(1,hexAlpha(cB,0)); ctx.beginPath(); ctx.arc(bx,by,r*(.3+energy*.3),0,Math.PI*2); ctx.fillStyle=grad; ctx.fill(); } ctx.beginPath(); ctx.arc(cx,cy,(.05+bass*.12)*Math.min(w,h),0,Math.PI*2); ctx.fillStyle=hexAlpha(cA,.5+energy*.3); ctx.fill(); } else if(style==="waveform"){ ctx.beginPath(); const sl=timeArr.length; for(let i=0;i<sl;i++){const x=(i/sl)*w,v=(timeArr[i]/128-1)*h*.35*p.intensity; if(i===0)ctx.moveTo(x,cy+v);else ctx.lineTo(x,cy+v);} ctx.strokeStyle=hexAlpha(cA,.9); ctx.lineWidth=2; ctx.stroke(); if(p.mirror){ctx.beginPath(); for(let i=0;i<sl;i++){const x=(i/sl)*w,v=(timeArr[i]/128-1)*h*.35*p.intensity;if(i===0)ctx.moveTo(x,cy-v);else ctx.lineTo(x,cy-v);} ctx.strokeStyle=hexAlpha(cB,.7); ctx.stroke();} } else if(style==="bars"){ const count=Math.min(p.barCount,dataArr.length); const bw=w/count*.8,gap=w/count*.2; for(let i=0;i<count;i++){ const t=i/count,val=(dataArr[Math.floor(i*dataArr.length/count)]/255)*p.intensity,bh=val*h*.85; const col=lerpColor(cA,cB,t); ctx.fillStyle=hexAlpha(col,.85); ctx.fillRect(i*(bw+gap),h-bh,bw,bh); if(p.mirror){ctx.fillStyle=hexAlpha(col,.3); ctx.fillRect(i*(bw+gap),0,bw,bh);} } } else if(style==="particles"){ const pArr=particlesRef.current; if(pArr.length!==p.particleCount) initParticles(p.particleCount); pArr.forEach(pt=>{ pt.vx+=(Math.random()-.5)*.0003*p.speed; pt.vy+=(Math.random()-.5)*.0003*p.speed-bass*.001*p.intensity; pt.x+=pt.vx; pt.y+=pt.vy; pt.life-=.004*p.speed; if(pt.x<0||pt.x>1||pt.y<0||pt.y>1||pt.life<=0){pt.x=.3+Math.random()*.4;pt.y=.5+Math.random()*.2;pt.vx=(Math.random()-.5)*.003;pt.vy=-Math.random()*.005*(1+bass*3);pt.life=.8+Math.random()*.2;pt.size=Math.random()*3+1;} ctx.beginPath(); ctx.arc(pt.x*w,pt.y*h,pt.size*(.5+energy*1.5),0,Math.PI*2); ctx.fillStyle=hexAlpha(lerpColor(cA,cB,1-pt.life),pt.life*.8); ctx.fill(); }); } }; draw(); return()=>{ cancelAnimationFrame(animRef.current); window.removeEventListener("resize",resize); }; },[]);
const sendChat = useCallback(async()=>{ const text=chatInput.trim(); if(!text||loading) return; setChatInput(""); setMessages(m=>[...m,{role:"user",text}]); setLoading(true); try { const sys=`You are an AI visual DJ controlling a music visualizer. Respond ONLY with a JSON object, no markdown, no explanation.Current state: style="${activeStyleRef.current}", colorA="${paramsRef.current.colorA}", colorB="${paramsRef.current.colorB}", speed=${paramsRef.current.speed}, intensity=${paramsRef.current.intensity}, complexity=${paramsRef.current.complexity}, smoothing=${paramsRef.current.smoothing}, particleCount=${paramsRef.current.particleCount}, barCount=${paramsRef.current.barCount}, mirror=${paramsRef.current.mirror}, rotation=${paramsRef.current.rotation}Return JSON: { style, colorA, colorB, speed(0.2-3), intensity(0.2-3), complexity(0-1), smoothing(0.5-0.98), particleCount(20-300), barCount(16-128), mirror, rotation, glow, message }Mood map: aggressive=high speed+intensity, chill=low speed+high smoothing, warm=reds/oranges, cool=blues/teals, neon=bright saturated. Style options: abstract|waveform|bars|particles`; const res=await fetch("https://api.anthropic.com/v1/messages",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:"claude-sonnet-4-20250514",max_tokens:500,system:sys,messages:[{role:"user",content:text}]})}); const data=await res.json(); const parsed=JSON.parse(data.content?.[0]?.text.replace(/```json|```/g,"").trim()||"{}"); const{message,...newParams}=parsed; setParams(p=>({...p,...newParams})); if(newParams.style) setActiveStyle(newParams.style); setMessages(m=>[...m,{role:"assistant",text:message||"Done!"}]); } catch(e){ setMessages(m=>[...m,{role:"assistant",text:"Couldn't parse that. Try again?"}]); } setLoading(false); },[chatInput,loading]);
return ( <TooltipProvider> <div className="flex flex-col h-screen bg-[#09090b] text-foreground overflow-hidden" style={{fontFamily:"var(--font-sans)"}}> {/* Header */} <div className="flex items-center justify-between px-4 py-2 border-b border-border/40"> <div className="flex items-center gap-2"> <Music2 size={16} className="text-violet-400" /> <span className="text-sm font-semibold tracking-tight text-white">Frequence</span> <Badge variant="outline" className="text-[10px] py-0 px-1.5 text-violet-400 border-violet-400/30">AI VJ</Badge> </div> <div className="flex items-center gap-2"> <div className={`w-1.5 h-1.5 rounded-full ${isPlaying?"bg-emerald-400 shadow-[0_0_6px_rgba(52,211,153,0.8)]":"bg-zinc-600"}`} /> <span className="text-xs text-muted-foreground">{isPlaying?(inputMode==="mic"?"Live mic":"Now playing"):"No audio"}</span> </div> </div>
<div className="flex flex-1 overflow-hidden"> {/* Left Panel */} <div className="w-52 border-r border-border/40 flex flex-col bg-[#0c0c10] overflow-hidden"> <ScrollArea className="flex-1"> <div className="p-3 space-y-4"> {/* Input Mode */} <div> <p className="text-[10px] uppercase tracking-widest text-muted-foreground mb-2">Source</p> <Tabs value={inputMode} onValueChange={v=>{setInputMode(v);stopAll();}}> <TabsList className="w-full h-7 bg-zinc-900"> <TabsTrigger value="file" className="flex-1 text-xs h-6">File</TabsTrigger> <TabsTrigger value="mic" className="flex-1 text-xs h-6">Mic</TabsTrigger> </TabsList> </Tabs> {inputMode==="file" && ( <div className="mt-2 space-y-2"> <label className="flex flex-col items-center gap-1 p-3 border border-dashed border-zinc-700 rounded-lg cursor-pointer hover:border-violet-500/50 hover:bg-violet-500/5 transition-colors"> <Upload size={14} className="text-muted-foreground" /> <span className="text-[11px] text-muted-foreground">{fileName?fileName.slice(0,16)+"…":"Drop audio file"}</span> <input type="file" accept="audio/*" className="hidden" onChange={e=>e.target.files[0]&&handleFile(e.target.files[0])} /> </label> {fileName && ( <> <div className="flex gap-1.5"> <Button size="sm" variant="outline" className="flex-1 h-7 text-xs gap-1" onClick={()=>{ if(audioElRef.current){if(isPlaying){audioElRef.current.pause();setIsPlaying(false);}else{audioElRef.current.play();setIsPlaying(true);}}}}> {isPlaying?<><Pause size={11}/>Pause</>:<><Play size={11}/>Play</>} </Button> <Button size="sm" variant="outline" className="h-7 w-7 p-0" onClick={()=>{if(audioElRef.current){audioElRef.current.currentTime=0;audioElRef.current.play();setIsPlaying(true);}}}> <RotateCcw size={11}/> </Button> </div> <AudioProgress audioElRef={audioElRef} isPlaying={isPlaying} /> </> )} </div> )} {inputMode==="mic" && ( <Button size="sm" variant={isPlaying?"destructive":"outline"} className="w-full mt-2 h-8 text-xs gap-1.5" onClick={isPlaying?stopAll:startMic}> {isPlaying?<><MicOff size={12}/>Stop mic</>:<><Mic size={12}/>Start mic</>} </Button> )} </div>
<Separator className="bg-border/40"/>
{/* Style */} <div> <p className="text-[10px] uppercase tracking-widest text-muted-foreground mb-2">Visual Style</p> <div className="space-y-1"> {STYLES.map(s=>( <button key={s} onClick={()=>setActiveStyle(s)} className={`w-full flex items-center gap-2 px-2.5 py-1.5 rounded-md text-xs transition-all ${activeStyle===s?"bg-violet-500/15 text-violet-300 border border-violet-500/30":"text-muted-foreground hover:text-foreground hover:bg-zinc-800 border border-transparent"}`}> <span className="font-mono text-[11px] w-5 text-center opacity-70">{STYLE_ICONS[s]}</span> {STYLE_LABELS[s]} {activeStyle===s && <ChevronRight size={10} className="ml-auto"/>} </button> ))} </div> </div>
<Separator className="bg-border/40"/>
{/* Colors */} <div> <p className="text-[10px] uppercase tracking-widest text-muted-foreground mb-2">Color Palette</p> <div className="flex gap-3"> {[["colorA","A"],["colorB","B"]].map(([key,label])=>( <div key={key} className="flex flex-col items-center gap-1"> <label className="relative cursor-pointer"> <div className="w-10 h-10 rounded-lg border-2 border-zinc-700 hover:border-zinc-500 transition-colors overflow-hidden" style={{background:params[key]}}> <input type="color" value={params[key]} onChange={e=>setParams(p=>({...p,[key]:e.target.value}))} className="opacity-0 absolute inset-0 w-full h-full cursor-pointer"/> </div> </label> <span className="text-[10px] text-muted-foreground">{label}</span> </div> ))} <div className="flex-1 rounded-lg h-10" style={{background:`linear-gradient(135deg,${params.colorA},${params.colorB})`}}/> </div> </div>
<Separator className="bg-border/40"/>
{/* Sliders */} <div> <p className="text-[10px] uppercase tracking-widest text-muted-foreground mb-3">Parameters</p> <div className="space-y-3"> {[["Speed","speed",.2,3,.1],["Intensity","intensity",.2,3,.1],["Smoothing","smoothing",.5,.98,.01]].map(([label,key,min,max,step])=>( <div key={key}> <div className="flex justify-between text-xs mb-1.5"> <span className="text-muted-foreground">{label}</span> <span className="text-zinc-400 font-mono">{params[key].toFixed(1)}</span> </div> <Slider min={min} max={max} step={step} value={[params[key]]} onValueChange={([v])=>setParams(p=>({...p,[key]:v}))} className="w-full"/> </div> ))} </div> </div>
<Separator className="bg-border/40"/>
{/* Toggles */} <div> <p className="text-[10px] uppercase tracking-widest text-muted-foreground mb-2">Modifiers</p> <div className="space-y-2"> {[["Mirror","mirror"],["Rotation","rotation"]].map(([label,key])=>( <div key={key} className="flex items-center justify-between"> <span className="text-xs text-muted-foreground">{label}</span> <Switch checked={params[key]} onCheckedChange={v=>setParams(p=>({...p,[key]:v}))} /> </div> ))} </div> </div> </div> </ScrollArea> </div>
{/* Canvas */} <canvas ref={canvasRef} className="flex-1 block w-full h-full" />
{/* Right Chat Panel */} <div className="w-56 border-l border-border/40 flex flex-col bg-[#0c0c10]"> <div className="px-3 py-2 border-b border-border/40 flex items-center gap-2"> <Zap size={12} className="text-violet-400"/> <span className="text-xs font-medium text-zinc-300">AI VJ</span> {loading && <Badge variant="secondary" className="ml-auto text-[9px] py-0 px-1">thinking…</Badge>} </div> <ScrollArea className="flex-1 p-3"> <div className="space-y-2"> {messages.map((m,i)=>( <div key={i} className={`text-xs rounded-lg px-2.5 py-2 leading-relaxed ${m.role==="user"?"bg-violet-500/15 text-violet-200 border border-violet-500/20 ml-3":"bg-zinc-900 text-zinc-400 border border-zinc-800 mr-3"}`}> {m.text} </div> ))} </div> </ScrollArea> <div className="p-2 border-t border-border/40 flex gap-1.5"> <input value={chatInput} onChange={e=>setChatInput(e.target.value)} onKeyDown={e=>e.key==="Enter"&&sendChat()} placeholder="describe the vibe…" className="flex-1 text-xs bg-zinc-900 border border-zinc-800 rounded-md px-2.5 py-1.5 text-zinc-300 placeholder:text-zinc-600 outline-none focus:border-violet-500/50 transition-colors" /> <Button size="sm" onClick={sendChat} disabled={loading} className="h-7 w-7 p-0 bg-violet-600 hover:bg-violet-500"> <ChevronRight size={13}/> </Button> </div> </div> </div> </div> </TooltipProvider> );}1234fastapi==0.109.0uvicorn==0.27.0pydantic==2.5.0openai.gitattributesAdded+35
.gitignoreDeleted-8
DockerfileDeleted-24
README.md+10-8
app.pyAdded+7
build/asset-manifest.jsonDeleted-15
build/favicon.icoDeleted
build/index.htmlDeleted-1
build/logo192.pngDeleted
build/logo512.pngDeleted
build/manifest.jsonDeleted-25
build/robots.txtDeleted-3
build/static/css/main.818486d5.cssDeleted-4
build/static/css/main.818486d5.css.mapDeleted-1
build/static/js/453.01567968.chunk.jsDeleted-2
build/static/js/453.01567968.chunk.js.mapDeleted-1
build/static/js/main.0fc9e4c2.jsDeleted
build/static/js/main.0fc9e4c2.js.LICENSE.txtDeleted-56
build/static/js/main.0fc9e4c2.js.mapDeleted
main.pyDeleted-134
music_visualizer.tsxAdded+372
requirements.txtDeleted-4