train-modle / static /css /style.css
fokan's picture
Force Space rebuild v2.1.0 with incremental training
cca1fa9
/* Multi-Modal Knowledge Distillation - Styles */
:root {
--primary-color: #2563eb;
--primary-hover: #1d4ed8;
--secondary-color: #64748b;
--success-color: #059669;
--danger-color: #dc2626;
--warning-color: #d97706;
--background-color: #f8fafc;
--surface-color: #ffffff;
--text-primary: #1e293b;
--text-secondary: #64748b;
--border-color: #e2e8f0;
--shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
--border-radius: 8px;
--transition: all 0.2s ease-in-out;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
background-color: var(--background-color);
color: var(--text-primary);
line-height: 1.6;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
min-height: 100vh;
display: flex;
flex-direction: column;
}
/* Header */
.header {
background: linear-gradient(135deg, var(--primary-color), #3b82f6);
color: white;
padding: 2rem 0;
margin-bottom: 2rem;
border-radius: var(--border-radius);
margin-top: 1rem;
}
.header-content h1 {
font-size: 2.5rem;
font-weight: 700;
margin-bottom: 0.5rem;
display: flex;
align-items: center;
gap: 1rem;
}
.header-content p {
font-size: 1.1rem;
opacity: 0.9;
}
/* Main Content */
.main-content {
flex: 1;
margin-bottom: 2rem;
}
/* Step Sections */
.step-section {
background: var(--surface-color);
border-radius: var(--border-radius);
padding: 2rem;
margin-bottom: 2rem;
box-shadow: var(--shadow);
border: 1px solid var(--border-color);
}
.step-section.hidden {
display: none;
}
.step-header {
margin-bottom: 2rem;
border-bottom: 1px solid var(--border-color);
padding-bottom: 1rem;
}
.step-header h2 {
font-size: 1.8rem;
font-weight: 600;
margin-bottom: 0.5rem;
display: flex;
align-items: center;
gap: 1rem;
}
.step-number {
background: var(--primary-color);
color: white;
width: 2rem;
height: 2rem;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 1rem;
font-weight: 700;
}
.step-header p {
color: var(--text-secondary);
font-size: 1rem;
}
/* Model Selection */
.model-selection {
display: grid;
gap: 2rem;
margin-bottom: 2rem;
}
.upload-section, .hf-section, .url-section {
border: 1px solid var(--border-color);
border-radius: var(--border-radius);
padding: 1.5rem;
}
.upload-section h3, .hf-section h3, .url-section h3 {
font-size: 1.2rem;
font-weight: 600;
margin-bottom: 1rem;
display: flex;
align-items: center;
gap: 0.5rem;
}
/* Upload Area */
.upload-area {
border: 2px dashed var(--border-color);
border-radius: var(--border-radius);
padding: 2rem;
text-align: center;
cursor: pointer;
transition: var(--transition);
background: #f8fafc;
}
.upload-area:hover {
border-color: var(--primary-color);
background: #f1f5f9;
}
.upload-area.dragover {
border-color: var(--primary-color);
background: #eff6ff;
}
.upload-content i {
font-size: 3rem;
color: var(--text-secondary);
margin-bottom: 1rem;
}
.upload-content p {
margin-bottom: 0.5rem;
}
.upload-hint {
font-size: 0.9rem;
color: var(--text-secondary);
}
/* Input Groups */
.hf-input-group, .url-input-group {
display: flex;
gap: 0.5rem;
margin-bottom: 1rem;
}
.hf-input, .url-input {
flex: 1;
padding: 0.75rem;
border: 1px solid var(--border-color);
border-radius: var(--border-radius);
font-size: 1rem;
transition: var(--transition);
}
.hf-input:focus, .url-input:focus {
outline: none;
border-color: var(--primary-color);
box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
/* HF Token Section */
.hf-token-section {
margin: 1rem 0;
padding: 1rem;
background: #f8fafc;
border-radius: var(--border-radius);
border: 1px solid var(--border-color);
}
.hf-token-section label {
display: block;
font-weight: 500;
margin-bottom: 0.5rem;
color: var(--text-primary);
}
.token-help {
display: block;
margin-top: 0.5rem;
color: var(--text-secondary);
font-size: 0.9rem;
}
.token-help a {
color: var(--primary-color);
text-decoration: none;
}
.token-help a:hover {
text-decoration: underline;
}
.token-input-group {
display: flex;
gap: 0.5rem;
margin-bottom: 0.5rem;
}
.token-input-group .hf-input {
flex: 1;
}
.token-status {
padding: 0.5rem;
border-radius: var(--border-radius);
margin-top: 0.5rem;
font-size: 0.9rem;
}
.token-status.success {
background: #d1fae5;
color: #065f46;
border: 1px solid #10b981;
}
.token-status.error {
background: #fee2e2;
color: #991b1b;
border: 1px solid #ef4444;
}
.token-status.warning {
background: #fef3c7;
color: #92400e;
border: 1px solid #f59e0b;
}
/* Trust Remote Code Section */
.trust-code-section {
margin: 1rem 0;
padding: 1rem;
background: #fef3c7;
border-radius: var(--border-radius);
border: 1px solid #f59e0b;
}
.checkbox-label {
display: flex;
align-items: center;
gap: 0.75rem;
font-weight: 500;
color: var(--text-primary);
cursor: pointer;
margin-bottom: 0.5rem;
}
.checkbox-label input[type="checkbox"] {
width: 1.2rem;
height: 1.2rem;
cursor: pointer;
}
.trust-help {
display: block;
color: #92400e;
font-size: 0.9rem;
line-height: 1.4;
}
.trust-help strong {
color: #dc2626;
}
/* Suggested Models */
.suggested-models {
margin: 1rem 0;
padding: 1rem;
background: #f1f5f9;
border-radius: var(--border-radius);
}
.suggested-models h4 {
font-size: 1rem;
font-weight: 600;
margin-bottom: 0.75rem;
color: var(--text-primary);
}
.model-suggestions {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
}
.suggestion-btn {
padding: 0.5rem 1rem;
background: var(--surface-color);
border: 1px solid var(--border-color);
border-radius: var(--border-radius);
font-size: 0.9rem;
cursor: pointer;
transition: var(--transition);
}
.suggestion-btn:hover {
background: var(--primary-color);
color: white;
border-color: var(--primary-color);
}
.suggestion-btn.trust-required {
background: #fef3c7;
border-color: #f59e0b;
color: #92400e;
}
.suggestion-btn.trust-required:hover {
background: #f59e0b;
color: white;
border-color: #f59e0b;
}
.suggestion-btn.gated-model {
background: #fee2e2;
border-color: #ef4444;
color: #991b1b;
}
.suggestion-btn.gated-model:hover {
background: #ef4444;
color: white;
border-color: #ef4444;
}
.suggestions-help {
display: block;
margin-top: 0.5rem;
color: #92400e;
font-size: 0.85rem;
}
/* Upload to HF Modal */
.btn-info {
background: linear-gradient(135deg, #17a2b8, #138496);
color: white;
border: none;
}
.btn-info:hover {
background: linear-gradient(135deg, #138496, #117a8b);
transform: translateY(-1px);
}
.alert {
padding: 1rem;
border-radius: var(--border-radius);
margin-bottom: 1rem;
border: 1px solid transparent;
}
.alert-success {
background: #d1fae5;
color: #065f46;
border-color: #10b981;
}
.alert-success a {
color: #047857;
font-weight: 600;
text-decoration: none;
}
.alert-success a:hover {
text-decoration: underline;
}
#hf-upload-form textarea {
resize: vertical;
min-height: 80px;
}
#hf-upload-form small {
display: block;
margin-top: 0.25rem;
color: #666;
font-size: 0.85rem;
}
#hf-upload-form small a {
color: var(--primary-color);
text-decoration: none;
}
#hf-upload-form small a:hover {
text-decoration: underline;
}
/* Incremental Training Section */
.incremental-training-section {
margin: 1.5rem 0;
padding: 1.5rem;
background: #f8f9fa;
border-radius: var(--border-radius);
border: 1px solid #e9ecef;
}
.incremental-training-section h4 {
color: var(--primary-color);
margin-bottom: 0.5rem;
font-size: 1.1rem;
}
.section-description {
color: #666;
font-size: 0.9rem;
margin-bottom: 1rem;
line-height: 1.4;
}
.incremental-options {
margin-top: 1rem;
padding: 1rem;
background: white;
border-radius: var(--border-radius);
border: 1px solid #dee2e6;
}
.student-info {
margin-top: 1rem;
padding: 1rem;
background: #f8f9fa;
border-radius: var(--border-radius);
border: 1px solid #dee2e6;
}
.student-info h5 {
color: var(--primary-color);
margin-bottom: 1rem;
font-size: 1rem;
}
.info-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 0.75rem;
margin-bottom: 1rem;
}
.info-item {
padding: 0.5rem;
background: white;
border-radius: 4px;
border: 1px solid #e9ecef;
font-size: 0.9rem;
}
.info-item strong {
color: var(--text-primary);
display: block;
margin-bottom: 0.25rem;
}
.info-item span {
color: #666;
word-break: break-word;
}
.btn-sm {
padding: 0.25rem 0.5rem;
font-size: 0.875rem;
margin-left: 0.5rem;
}
.alert-info {
background: #d1ecf1;
color: #0c5460;
border: 1px solid #bee5eb;
padding: 0.75rem;
border-radius: var(--border-radius);
margin-top: 1rem;
}
.alert-info i {
margin-right: 0.5rem;
}
#existing-student {
margin-bottom: 0.5rem;
}
/* Validation Status */
.validation-status {
margin-top: 0.5rem;
padding: 0.5rem;
border-radius: var(--border-radius);
font-size: 0.9rem;
line-height: 1.4;
}
.validation-status.success {
background: #d1fae5;
color: #065f46;
border: 1px solid #10b981;
}
.validation-status.error {
background: #fee2e2;
color: #991b1b;
border: 1px solid #ef4444;
}
.validation-status strong {
color: var(--primary-color);
cursor: pointer;
}
.alert-warning {
background: #fef3c7;
color: #92400e;
border: 1px solid #f59e0b;
padding: 0.75rem;
border-radius: var(--border-radius);
}
/* Student Source Options */
.radio-group {
display: flex;
flex-direction: column;
gap: 0.5rem;
margin-bottom: 1rem;
}
.radio-label {
display: flex;
align-items: center;
gap: 0.5rem;
cursor: pointer;
padding: 0.5rem;
border-radius: var(--border-radius);
transition: background-color 0.2s;
}
.radio-label:hover {
background: #f8f9fa;
}
.radio-label input[type="radio"] {
margin: 0;
}
.radio-mark {
font-weight: 500;
}
.student-source-options {
margin-top: 1rem;
padding: 1rem;
background: white;
border-radius: var(--border-radius);
border: 1px solid #dee2e6;
}
.student-source-options.hidden {
display: none;
}
#student-file-upload {
width: 100%;
padding: 0.5rem;
border: 2px dashed #dee2e6;
border-radius: var(--border-radius);
background: #f8f9fa;
cursor: pointer;
}
#student-file-upload:hover {
border-color: var(--primary-color);
background: #e3f2fd;
}
/* Buttons */
.btn {
padding: 0.75rem 1.5rem;
border: none;
border-radius: var(--border-radius);
font-size: 1rem;
font-weight: 500;
cursor: pointer;
transition: var(--transition);
display: inline-flex;
align-items: center;
gap: 0.5rem;
text-decoration: none;
}
.btn:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.btn-primary {
background: var(--primary-color);
color: white;
}
.btn-primary:hover:not(:disabled) {
background: var(--primary-hover);
}
.btn-secondary {
background: var(--secondary-color);
color: white;
}
.btn-secondary:hover:not(:disabled) {
background: #475569;
}
.btn-success {
background: var(--success-color);
color: white;
}
.btn-success:hover:not(:disabled) {
background: #047857;
}
.btn-danger {
background: var(--danger-color);
color: white;
}
.btn-danger:hover:not(:disabled) {
background: #b91c1c;
}
/* Selected Models */
.selected-models {
margin-bottom: 2rem;
}
.selected-models h3 {
font-size: 1.3rem;
font-weight: 600;
margin-bottom: 1rem;
}
.models-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 1rem;
}
.model-card {
border: 1px solid var(--border-color);
border-radius: var(--border-radius);
padding: 1rem;
background: #f8fafc;
position: relative;
}
.model-card h4 {
font-size: 1.1rem;
font-weight: 600;
margin-bottom: 0.5rem;
}
.model-info {
font-size: 0.9rem;
color: var(--text-secondary);
margin-bottom: 0.5rem;
}
.model-remove {
position: absolute;
top: 0.5rem;
right: 0.5rem;
background: var(--danger-color);
color: white;
border: none;
border-radius: 50%;
width: 1.5rem;
height: 1.5rem;
cursor: pointer;
font-size: 0.8rem;
}
/* Configuration */
.config-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 2rem;
margin-bottom: 2rem;
}
.config-section {
border: 1px solid var(--border-color);
border-radius: var(--border-radius);
padding: 1.5rem;
}
.config-section h3 {
font-size: 1.2rem;
font-weight: 600;
margin-bottom: 1rem;
display: flex;
align-items: center;
gap: 0.5rem;
}
.form-group {
margin-bottom: 1rem;
}
.form-group label {
display: block;
font-weight: 500;
margin-bottom: 0.5rem;
}
.form-control {
width: 100%;
padding: 0.75rem;
border: 1px solid var(--border-color);
border-radius: var(--border-radius);
font-size: 1rem;
transition: var(--transition);
}
.form-control:focus {
outline: none;
border-color: var(--primary-color);
box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
/* Progress */
.progress-container {
display: grid;
gap: 2rem;
}
.progress-section, .metrics-section, .console-section {
border: 1px solid var(--border-color);
border-radius: var(--border-radius);
padding: 1.5rem;
}
.progress-section h3, .metrics-section h3, .console-section h3 {
font-size: 1.2rem;
font-weight: 600;
margin-bottom: 1rem;
display: flex;
align-items: center;
gap: 0.5rem;
}
.progress-bar-container {
display: flex;
align-items: center;
gap: 1rem;
margin-bottom: 1rem;
}
.progress-bar {
flex: 1;
height: 1rem;
background: var(--border-color);
border-radius: 0.5rem;
overflow: hidden;
}
.progress-fill {
height: 100%;
background: linear-gradient(90deg, var(--primary-color), #3b82f6);
width: 0%;
transition: width 0.3s ease;
}
.progress-text {
font-weight: 600;
min-width: 3rem;
}
.progress-info {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
gap: 1rem;
}
.info-item {
display: flex;
justify-content: space-between;
}
.info-label {
font-weight: 500;
}
.info-value {
font-weight: 600;
color: var(--primary-color);
}
/* Metrics */
.metrics-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
gap: 1rem;
}
.metric-card {
background: #f8fafc;
border: 1px solid var(--border-color);
border-radius: var(--border-radius);
padding: 1rem;
text-align: center;
}
.metric-label {
font-size: 0.9rem;
color: var(--text-secondary);
margin-bottom: 0.5rem;
}
.metric-value {
font-size: 1.5rem;
font-weight: 700;
color: var(--primary-color);
}
/* Console */
.console {
background: #1e293b;
color: #e2e8f0;
border-radius: var(--border-radius);
padding: 1rem;
height: 200px;
overflow-y: auto;
font-family: 'Courier New', monospace;
font-size: 0.9rem;
}
.console-line {
margin-bottom: 0.25rem;
}
.console-line.error {
color: #fca5a5;
}
.console-line.warning {
color: #fcd34d;
}
.console-line.success {
color: #86efac;
}
/* Step Actions */
.step-actions {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 2rem;
padding-top: 1rem;
border-top: 1px solid var(--border-color);
}
/* Modals */
.modal {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
}
.modal.hidden {
display: none;
}
.modal-content {
background: var(--surface-color);
border-radius: var(--border-radius);
padding: 2rem;
max-width: 500px;
width: 90%;
box-shadow: var(--shadow-lg);
}
.modal-content h3 {
font-size: 1.3rem;
font-weight: 600;
margin-bottom: 1rem;
}
.modal-content p {
margin-bottom: 1.5rem;
color: var(--text-secondary);
}
.modal-actions {
display: flex;
justify-content: flex-end;
gap: 1rem;
}
/* Footer */
.footer {
text-align: center;
padding: 1rem 0;
color: var(--text-secondary);
border-top: 1px solid var(--border-color);
margin-top: auto;
}
/* Responsive Design */
@media (max-width: 768px) {
.container {
padding: 0 1rem;
}
.header-content h1 {
font-size: 2rem;
}
.step-section {
padding: 1rem;
}
.config-grid {
grid-template-columns: 1fr;
}
.models-grid {
grid-template-columns: 1fr;
}
.hf-input-group, .url-input-group {
flex-direction: column;
}
.step-actions {
flex-direction: column;
gap: 1rem;
}
.progress-info {
grid-template-columns: 1fr;
}
.metrics-grid {
grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}
}
/* Loading Overlay */
.loading-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.7);
display: flex;
align-items: center;
justify-content: center;
z-index: 2000;
}
.loading-content {
background: var(--surface-color);
border-radius: var(--border-radius);
padding: 2rem;
text-align: center;
box-shadow: var(--shadow-lg);
max-width: 300px;
}
.loading-spinner {
width: 40px;
height: 40px;
border: 4px solid var(--border-color);
border-top: 4px solid var(--primary-color);
border-radius: 50%;
animation: spin 1s linear infinite;
margin: 0 auto 1rem;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
.loading-message {
font-weight: 500;
color: var(--text-primary);
}
/* Utility Classes */
.hidden {
display: none !important;
}
.text-center {
text-align: center;
}
.text-success {
color: var(--success-color);
}
.text-danger {
color: var(--danger-color);
}
.text-warning {
color: var(--warning-color);
}
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
/* Advanced Navigation Styles */
.advanced-nav {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
padding: 20px 0;
margin-bottom: 30px;
border-radius: 12px;
box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.nav-container {
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
}
.advanced-nav h3 {
color: white;
margin-bottom: 15px;
font-size: 1.4em;
text-align: center;
}
.nav-links {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 15px;
}
.nav-link {
display: flex;
flex-direction: column;
align-items: center;
padding: 20px;
background: rgba(255,255,255,0.1);
border-radius: 10px;
text-decoration: none;
color: white;
transition: all 0.3s ease;
backdrop-filter: blur(10px);
border: 1px solid rgba(255,255,255,0.2);
}
.nav-link:hover {
background: rgba(255,255,255,0.2);
transform: translateY(-2px);
box-shadow: 0 6px 20px rgba(0,0,0,0.15);
color: white;
}
.nav-link i {
font-size: 2em;
margin-bottom: 8px;
}
.nav-link span {
font-weight: 600;
font-size: 1.1em;
margin-bottom: 4px;
}
.nav-link small {
opacity: 0.8;
font-size: 0.9em;
text-align: center;
}
/* Responsive Design for Advanced Nav */
@media (max-width: 768px) {
.nav-links {
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 10px;
}
.nav-link {
padding: 15px;
}
.nav-link i {
font-size: 1.5em;
}
}
/* Modal Styles */
.modal-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0,0,0,0.5);
display: none;
align-items: center;
justify-content: center;
z-index: 1000;
}
.modal-content {
background: white;
border-radius: 12px;
max-width: 800px;
max-height: 80vh;
overflow-y: auto;
box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.modal-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20px;
border-bottom: 1px solid #eee;
}
.modal-header h3 {
margin: 0;
color: #333;
}
.modal-close {
background: none;
border: none;
font-size: 24px;
cursor: pointer;
color: #999;
padding: 0;
width: 30px;
height: 30px;
display: flex;
align-items: center;
justify-content: center;
}
.modal-close:hover {
color: #333;
}
.modal-body {
padding: 20px;
}
/* Model Card Styles */
.model-card {
border: 1px solid #ddd;
border-radius: 8px;
padding: 15px;
margin-bottom: 15px;
background: #f9f9f9;
}
.model-card h4 {
margin: 0 0 10px 0;
color: #333;
}
.model-card p {
margin: 0 0 10px 0;
color: #666;
}
.model-info {
display: flex;
gap: 8px;
flex-wrap: wrap;
margin-bottom: 10px;
}
/* System Info Styles */
.system-info {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.info-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 15px;
margin-bottom: 20px;
}
.info-item {
padding: 10px;
background: #f5f5f5;
border-radius: 6px;
border-left: 4px solid #007bff;
}
.optimization-list, .recommendation-list {
list-style-type: none;
padding: 0;
}
.optimization-list li, .recommendation-list li {
padding: 8px 12px;
margin-bottom: 5px;
background: #e8f5e8;
border-radius: 4px;
border-left: 3px solid #28a745;
}
.recommendation-list li {
background: #fff3cd;
border-left-color: #ffc107;
}
/* Notification Styles */
.notification {
position: fixed;
top: 20px;
right: 20px;
padding: 15px 20px;
border-radius: 6px;
color: white;
font-weight: 500;
z-index: 1100;
animation: slideIn 0.3s ease-out;
max-width: 400px;
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.notification-success {
background: #28a745;
}
.notification-error {
background: #dc3545;
}
@keyframes slideIn {
from {
transform: translateX(100%);
opacity: 0;
}
to {
transform: translateX(0);
opacity: 1;
}
}