Spaces:
Runtime error
Runtime error
File size: 6,829 Bytes
9abfe19 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 | gr.HTML("""
<link rel="preconnect" href="https://fonts.googleapis.com">
<link href="https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@300;400;500;600;700&display=swap" rel="stylesheet">
""")
/* body { outline: 3px solid red !important; }
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } */
body, .gradio-container {
background: #0f0f13 !important;
font-family: 'Be Vietnam Pro', sans-serif !important;
min-height: 100vh;
}
.gradio-container {
max-width: 560px !important;
margin: 0 auto !important;
padding: 32px 20px 60px !important;
}
/* HEADER */
.lumi-header { text-align: center; margin-bottom: 32px; }
.lumi-logo-ring {
width: 72px; height: 72px; border-radius: 50%;
background: conic-gradient(from 180deg, #7c6ff7, #a78bfa, #38bdf8, #7c6ff7);
display: flex; align-items: center; justify-content: center;
margin: 0 auto 14px;
animation: lumi-spin 8s linear infinite;
box-shadow: 0 0 32px #7c6ff755;
font-size: 28px;
}
@keyframes lumi-spin { to { transform: rotate(360deg); } }
.lumi-header h1 { font-size: 22px; font-weight: 700; color: #e2e0ff; letter-spacing: -0.3px; }
.lumi-header p { font-size: 13.5px; color: #6b6b8a; margin-top: 5px; }
/* STEPS */
.lumi-steps { display: flex; align-items: center; justify-content: center; margin-bottom: 24px; }
.lumi-step { display: flex; flex-direction: column; align-items: center; gap: 5px; flex: 1; }
.lumi-step-num {
width: 32px; height: 32px; border-radius: 50%;
background: #1e1e2e; border: 2px solid #2a2a40;
color: #44446a; font-size: 13px; font-weight: 600;
display: flex; align-items: center; justify-content: center;
}
.lumi-step-lbl { font-size: 11px; color: #44446a; font-weight: 500; }
.lumi-step-line { height: 2px; background: #1e1e2e; flex: 1; max-width: 60px; margin-top: -22px; }
/* CARD */
.lumi-card {
background: #16161f; border: 1px solid #21212f;
border-radius: 20px; padding: 22px; margin-bottom: 14px;
box-shadow: 0 4px 24px #00000044;
}
/* RECORDER */
#lumi-recorder-ui { display: flex; flex-direction: column; align-items: center; gap: 14px; }
#lumi-mic-btn {
width: 80px; height: 80px; border-radius: 50%;
background: linear-gradient(135deg, #1e1e2e, #2a2040);
border: 2px solid #3a3060;
cursor: pointer; transition: all 0.25s ease;
display: flex; align-items: center; justify-content: center;
font-size: 32px; outline: none;
}
#lumi-mic-btn:hover { transform: scale(1.08); border-color: #7c6ff7; box-shadow: 0 0 24px #7c6ff750; }
#lumi-mic-btn.recording {
background: linear-gradient(135deg, #3a1a3a, #5a1060);
border-color: #c084fc;
animation: lumi-pulse 1.2s ease-out infinite;
}
@keyframes lumi-pulse {
0% { box-shadow: 0 0 0 0 rgba(192,132,252,0.55); }
70% { box-shadow: 0 0 0 22px rgba(192,132,252,0); }
100% { box-shadow: 0 0 0 0 rgba(192,132,252,0); }
}
#lumi-rec-label { font-size: 12px; color: #6b6b8a; font-weight: 500; }
#lumi-rec-label.recording { color: #c084fc; }
/* CANVAS */
#lumi-canvas {
width: 100%; height: 72px; border-radius: 12px;
background: #0f0f18; border: 1px solid #21212f; display: block;
}
/* PROCESSING BAR */
#lumi-proc-bar {
display: none; width: 100%; padding: 10px 14px;
background: #13131e; border: 1px solid #2a2240; border-radius: 12px;
}
#lumi-proc-bar .plabel {
font-size: 11px; color: #8877cc; font-weight: 600;
letter-spacing: 0.5px; margin-bottom: 7px;
display: flex; align-items: center; gap: 6px;
}
#lumi-proc-bar .pdot { animation: pdot 1.1s ease-in-out infinite; }
@keyframes pdot { 0%,100%{opacity:1} 50%{opacity:0.2} }
#lumi-proc-bar .ptrack { height: 4px; background: #1e1e2e; border-radius: 99px; overflow: hidden; }
#lumi-proc-bar .pfill {
height: 100%; border-radius: 99px;
background: linear-gradient(90deg, #7c6ff7, #38bdf8);
animation: pfill 1.6s ease-in-out infinite;
}
@keyframes pfill {
0% { width:0%; margin-left:0%; }
50% { width:55%; margin-left:20%; }
100% { width:0%; margin-left:100%; }
}
/* PLAYBACK */
#lumi-audio-playback { width: 100%; display: none; flex-direction: column; gap: 6px; }
#lumi-audio-playback audio {
width: 100%; height: 36px; border-radius: 10px; outline: none;
accent-color: #7c6ff7;
}
#lumi-audio-playback .play-label { font-size: 11px; color: #6b6b8a; font-weight: 500; }
/* STATUS */
.lumi-status {
background: #12121a !important; border: 1px solid #1e1e2e !important;
border-radius: 12px !important; padding: 14px 18px !important;
color: #c0b8ff !important; font-size: 14px !important;
font-weight: 500 !important; min-height: 50px !important;
}
/* BUTTONS */
.lumi-btn-row { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; margin-bottom: 10px; }
button.lb-check, button.lb-reset, button.lb-send {
border-radius: 12px !important;
font-family: 'Be Vietnam Pro', sans-serif !important;
font-weight: 600 !important; font-size: 14px !important;
padding: 14px 20px !important; border: none !important;
cursor: pointer !important; transition: all 0.2s ease !important;
width: 100% !important;
}
button.lb-check {
background: #1e1e2e !important; color: #a0a0c0 !important;
border: 1.5px solid #2a2a40 !important;
}
button.lb-check:hover:not(:disabled) {
background: #24243a !important; border-color: #7c6ff7 !important; color: #c0b8ff !important;
}
button.lb-reset {
background: #1e1520 !important; color: #c084fc !important;
border: 1.5px solid #3d2060 !important;
}
button.lb-reset:hover:not(:disabled) { background: #2a1a30 !important; border-color: #a855f7 !important; }
button.lb-send {
background: linear-gradient(135deg, #7c6ff7, #a78bfa) !important;
color: #fff !important; box-shadow: 0 4px 16px #7c6ff740 !important;
}
button.lb-send:hover:not(:disabled) {
transform: translateY(-2px) !important; box-shadow: 0 6px 24px #7c6ff760 !important;
}
button.lb-send:disabled {
background: #2a2a3e !important; color: #44446a !important;
box-shadow: none !important; cursor: not-allowed !important;
}
/* INSTRUCTION */
.lumi-instruction {
background: #16161f; border: 1px solid #21212f; border-radius: 14px;
padding: 16px 18px; margin-bottom: 14px;
}
.lumi-instruction .ititle {
font-size: 11px; color: #6b6b8a; font-weight: 600;
text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 8px;
}
.lumi-instruction p { font-size: 13px; color: #9090b0; line-height: 1.75; }
.lumi-instruction .hi { color: #a78bfa; font-weight: 600; }
.lumi-instruction .hw { color: #e2e0ff; font-weight: 700; }
footer { display: none !important; }
.contain { background: transparent !important; }
.hidden-audio-wrap { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; } |