How arv-anshul/yt-comment-sentiment works
Main System Components
a. Frontend Layer
• Built with Vue.js and Vite
• Components for video URL input, comments display, and sentiment visualization
• UI components using shadcn/ui
• Key components:
• VideoUrlInputForm
• VideoComments
• SentimentPieChart
• YTVideoDetailsCard
b. Backend Layer
• FastAPI-based server
• YouTube data fetching capabilities
• Inference endpoint for sentiment analysis
• Routes for insights and analytics
c. ML Pipeline Layer
• Data ingestion
• Model building
• Model evaluation
• MLflow experiment tracking
• DVC pipeline management
Component Relationships and Data Flow
• Frontend → Backend API calls
• Backend → YouTube API interactions
• Backend → ML Model inference calls
• ML Pipeline → MLflow tracking
• DVC → Pipeline orchestration
External Services Integration
• YouTube Data API
• MLflow tracking server
• Model registry
Specific Implementation Details
Create sections showing:
a. ML Pipeline Flow:
Data Ingestion → Text Vectorization (TfidfVectorizer) → Model Training (HistGradientBoostingClassifier) → Model Evaluation
b. API Flow:
Frontend Request → FastAPI Backend → Sentiment Prediction → Response with Results
Technology Stack Representation
• Frontend: Vue.js, Tailwind CSS, shadcn/ui
• Backend: FastAPI, Python
• ML: scikit-learn, NLTK
• DevOps: DVC, MLflow
• Data Processing: Polars
Deployment Architecture
Containers/services:
• Frontend container (Nginx)
• Backend container (FastAPI)
• ML model serving
• Docker Compose orchestration