anujjj321's picture
Upload folder using huggingface_hub
f65b509 verified
Raw
History Blame Contribute Delete
6.56 kB
:root {
--bg-color: #0b0f19;
--text-primary: #ffffff;
--text-secondary: #94a3b8;
--accent: #3b82f6;
--accent-hover: #2563eb;
--danger: #ef4444;
--success: #10b981;
--glass-bg: rgba(30, 41, 59, 0.7);
--glass-border: rgba(255, 255, 255, 0.1);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Inter', sans-serif;
}
body {
background-color: var(--bg-color);
color: var(--text-primary);
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;
position: relative;
}
/* Dynamic Background Aesthetics */
.background-gradient {
position: absolute;
top: 0; left: 0; right: 0; bottom: 0;
background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.1), transparent 40%),
radial-gradient(circle at bottom left, rgba(239, 68, 68, 0.05), transparent 40%);
z-index: -2;
}
.orb {
position: absolute;
border-radius: 50%;
filter: blur(80px);
z-index: -1;
opacity: 0.5;
animation: float 20s ease-in-out infinite alternate;
}
.orb1 {
width: 300px; height: 300px;
background: #3b82f6;
top: 10%; left: 20%;
}
.orb2 {
width: 250px; height: 250px;
background: #8b5cf6;
bottom: 20%; right: 20%;
animation-delay: -10s;
}
@keyframes float {
0% { transform: translate(0, 0) scale(1); }
100% { transform: translate(50px, 50px) scale(1.1); }
}
/* Main Container */
.app-container {
width: 100%;
max-width: 600px;
padding: 2rem;
z-index: 10;
}
header {
text-align: center;
margin-bottom: 3rem;
animation: fade-in 1s ease-out;
}
.logo {
display: flex;
align-items: center;
justify-content: center;
gap: 0.75rem;
margin-bottom: 0.5rem;
}
.logo-mark {
background: linear-gradient(135deg, #3b82f6, #8b5cf6);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
font-size: 2rem;
}
h1 {
font-size: 2rem;
font-weight: 700;
letter-spacing: -0.5px;
}
header p {
color: var(--text-secondary);
font-size: 1rem;
}
/* Glassmorphism Panels */
.glass-panel {
background: var(--glass-bg);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
border: 1px solid var(--glass-border);
border-radius: 20px;
padding: 2.5rem;
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
transition: all 0.3s ease;
}
/* Upload Section */
.upload-section {
cursor: pointer;
text-align: center;
border: 2px dashed rgba(255,255,255,0.2);
}
.upload-section:hover, .upload-section.dragover {
border-color: var(--accent);
background: rgba(59, 130, 246, 0.1);
transform: translateY(-2px);
}
.upload-icon {
width: 48px;
height: 48px;
color: var(--text-secondary);
margin-bottom: 1rem;
transition: color 0.3s ease;
}
.upload-section:hover .upload-icon {
color: var(--accent);
}
.upload-content h3 { margin-bottom: 0.5rem; font-weight: 600; }
.upload-content .highlight { color: var(--accent); font-weight: 600; }
.upload-content .subtitle { font-size: 0.85rem; color: var(--text-secondary); margin-top: 0.5rem; }
/* Loading State */
.loading-state {
display: none;
text-align: center;
padding: 3rem 0;
}
.spinner {
width: 40px; height: 40px;
border: 3px solid rgba(255,255,255,0.1);
border-radius: 50%;
border-top-color: var(--accent);
animation: spin 1s linear infinite;
margin: 0 auto 1rem auto;
}
@keyframes spin { 100% { transform: rotate(360deg); } }
/* Results Section */
.result-section {
display: none;
animation: slide-up 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slide-up {
0% { opacity: 0; transform: translateY(20px); }
100% { opacity: 1; transform: translateY(0); }
}
.preview-container {
width: 100%;
height: 250px;
border-radius: 12px;
overflow: hidden;
margin-bottom: 2rem;
position: relative;
background: #000;
}
#preview-img {
width: 100%; height: 100%;
object-fit: contain;
}
.status-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 1.5rem;
}
.status-header h2 { font-size: 1.25rem; font-weight: 600; }
.badge {
padding: 0.35rem 1rem;
border-radius: 50px;
font-size: 0.85rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.badge.danger { background: rgba(239, 68, 68, 0.2); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.3); }
.badge.success { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.3); }
.metric-header {
display: flex;
justify-content: space-between;
font-size: 0.9rem;
margin-bottom: 0.5rem;
color: var(--text-secondary);
}
#confidence-text { color: var(--text-primary); font-weight: 600; }
.progress-track {
width: 100%; height: 8px;
background: rgba(255,255,255,0.1);
border-radius: 4px;
overflow: hidden;
margin-bottom: 2rem;
}
.progress-fill {
height: 100%;
width: 0%;
background: var(--accent);
border-radius: 4px;
transition: width 1s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s;
}
.reset-btn {
width: 100%;
padding: 1rem;
border: none;
border-radius: 8px;
background: rgba(255,255,255,0.05);
color: var(--text-primary);
font-weight: 600;
cursor: pointer;
transition: all 0.2s ease;
border: 1px solid var(--glass-border);
}
.reset-btn:hover {
background: rgba(255,255,255,0.1);
}
@keyframes fade-in {
from { opacity: 0; }
to { opacity: 1; }
}
/* YOLO Box Overlay Elements */
#bbox-overlay {
position: absolute;
top: 0; left: 0;
width: 100%; height: 100%;
pointer-events: none; /* allows clicking through boxes if needed */
}
.bounding-box {
position: absolute;
border: 2px solid;
border-radius: 4px;
box-shadow: 0 0 10px rgba(0,0,0,0.5);
transition: all 0.2s ease;
}
.box-danger {
border-color: #ef4444;
background-color: rgba(239, 68, 68, 0.1);
}
.box-safe {
border-color: #10b981;
background-color: rgba(16, 185, 129, 0.1);
}
.box-label {
position: absolute;
top: -24px;
left: -2px;
color: #fff;
padding: 2px 6px;
font-size: 11px;
font-weight: 700;
white-space: nowrap;
border-radius: 4px;
box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.box-danger .box-label { background: #ef4444; }
.box-safe .box-label { background: #10b981; }