import { Progress } from './ui/progress'; interface ProcessingPipelineProps { currentStep: number; isProcessing: boolean; } export function ProcessingPipeline({ currentStep, isProcessing }: ProcessingPipelineProps) { const steps = [ { id: 1, title: 'Step 1: Video Enhancement', description: 'Brightening darkened video data', }, { id: 2, title: 'Step 2: Keypoint Extraction', description: 'Detecting hand and body landmarks', }, { id: 3, title: 'Step 3: Transformer Translation', description: 'Sequence classification using the trained transformer model', }, { id: 4, title: 'Overall Progress', description: 'Total processing completion', }, ]; const getStepStatus = (stepId: number) => { if (stepId === 4) { if (currentStep >= 4) return 'completed'; if (currentStep > 0) return 'processing'; return 'pending'; } if (currentStep > stepId) return 'completed'; if (currentStep === stepId) return 'processing'; return 'pending'; }; const getStatusIcon = (stepId: number) => { const status = getStepStatus(stepId); if (status === 'completed') return '✓'; if (status === 'processing') return '⟳'; return '○'; }; const getStatusColor = (stepId: number) => { const status = getStepStatus(stepId); if (status === 'completed') return 'text-green-600 bg-green-50'; if (status === 'processing') return 'text-blue-600 bg-blue-50'; return 'text-gray-400 bg-gray-100'; }; return (

Processing Pipeline

Real-time translation progress and status

{currentStep === 0 ? 'Idle' : isProcessing ? 'Processing...' : 'Completed'}
{steps.map((step, index) => (
{getStatusIcon(step.id)}
{step.title}
{step.description}
{getStepStatus(step.id) !== 'pending' && step.id !== 4 && (
)} {step.id === 4 && currentStep > 0 && (
Progress {getStepStatus(step.id) === 'completed' ? 100 : Math.min(currentStep * 25, 100)}%
)}
{getStepStatus(step.id) === 'completed' ? 'Done' : getStepStatus(step.id) === 'processing' ? 'In Progress' : 'Pending'}
))}
); }