How welpmemates/dlsa works
DLSA is a full-stack IMDB review sentiment analyzer: users submit a review in the React app, which calls a FastAPI endpoint that preprocesses the text and runs a trained BiLSTM, then displays the prediction and session history. A separate notebook trains and evaluates the model; inference reuses its saved checkpoint and vocabulary. The graph includes documented training stages and the visible frontend components. Training details and some UI modules are documented or indexed but not excerpted, so those links rely on the README or import references.
Main entry points: App.jsx App state and API · model.py Tokenizer and BiLSTM · main.py FastAPI endpoints · IMDB_BiLSTM_Sentiment_Analysis.ipynb Model evaluation
Components 21
Model training
- IMDB reviews
- Text preprocessing
IMDB_BiLSTM_Sentiment_Analysis.ipynb - Vocabulary building
IMDB_BiLSTM_Sentiment_Analysis.ipynb - Review encoding
IMDB_BiLSTM_Sentiment_Analysis.ipynb - BiLSTM training
IMDB_BiLSTM_Sentiment_Analysis.ipynb - Model evaluation
IMDB_BiLSTM_Sentiment_Analysis.ipynb
Inference service
- FastAPI endpoints
backend/main.py - Tokenizer and BiLSTM
backend/model.py
Web application
- React entry
frontend/src/main.jsx - App state and API
frontend/src/App.jsx - Review analyzer
frontend/src/components/Analyzer.jsx - Example reviews
frontend/src/data/examples.js - Prediction result
frontend/src/components/PredictionResult.jsx - Prediction history
frontend/src/components/PredictionHistory.jsx - Navigation
frontend/src/components/Navbar.jsx - Model information
frontend/src/components/ModelStats.jsx - Pipeline overview
frontend/src/components/Pipeline.jsx - Footer
frontend/src/components/Footer.jsx
Model artifacts
- Saved vocabulary
models/vocab.json - Model checkpoint
models/sentiment_bilstm.pth
Other components
- Review user
Connections 23
- Review user → App state and API: enters review
README.md - IMDB reviews → Text preprocessing: loads and cleans
README.md - Text preprocessing → Vocabulary building: tokenizes text
README.md - Vocabulary building → Review encoding: maps tokens
README.md - Review encoding → BiLSTM training: feeds sequences
README.md - BiLSTM training → Model evaluation: evaluated by
README.md - Model evaluation → Model checkpoint: saves checkpoint
README.md - Model evaluation → Saved vocabulary: saves vocabulary
README.md - React entry → App state and API: renders
frontend/src/main.jsx - App state and API → Review analyzer: renders and supplies props
frontend/src/App.jsx - App state and API → Example reviews: reads examples
frontend/src/App.jsx - App state and API → Prediction result: renders result
frontend/src/App.jsx - App state and API → Prediction history: renders history
frontend/src/App.jsx - App state and API → Navigation: renders
frontend/src/App.jsx - App state and API → Model information: renders
frontend/src/App.jsx - App state and API → Pipeline overview: renders
frontend/src/App.jsx - App state and API → Footer: renders
frontend/src/App.jsx - App state and API → FastAPI endpoints: checks health and posts review
frontend/src/App.jsx - FastAPI endpoints → Tokenizer and BiLSTM: loads and invokes
backend/main.py - Tokenizer and BiLSTM → Saved vocabulary: loads vocabulary
backend/model.py - Tokenizer and BiLSTM → Model checkpoint: loads weights
backend/model.py - FastAPI endpoints → App state and API: returns prediction or status
frontend/src/App.jsx - Tokenizer and BiLSTM → FastAPI endpoints: returns sentiment and probabilities
backend/main.py