How rameshrocks-cyber/rnn-project works
This repository builds and deploys a recurrent-neural-network sentiment classifier. The main user workflow is submitting a review through the Streamlit app and receiving a sentiment label with confidence; a standalone inference API offers a separate entry point. The training workflow prepares and splits reviews, fits tokenization, trains SimpleRNN/LSTM/GRU variants, and evaluates them. The graph includes documented benchmarking and artifact export capabilities; unsampled implementation details are not expanded beyond README-supported relationships.
Main entry points: saved_models Saved Models and Configs · train.py Training Orchestrator · preprocessor.py Text Preprocessing · evaluate.py Model Evaluation
Components 16
Data and Modeling
- Load and Split
src/data_loader.py - Text Preprocessing
src/preprocessor.py - Model Configuration
src/config.py - RNN LSTM GRU
src/model.py
Training and Evaluation
- Training Orchestrator
src/train.py - Model Evaluation
src/evaluate.py - Benchmark Charts
src/benchmark_charts.py
Inference Products
- Streamlit Review App
app/app.py - Modular Predictor
src/predict.py - Production Inference Engine
prediction.py - Inference API Re-export
src/prediction.py
Model Artifacts
- Artifact Export
src/export_artifacts.py - Saved Models and Configs
saved_models
Other components
- Review Submitter
- Raw Reviews
- Sentiment and Confidence
Connections 24
- Raw Reviews → Load and Split: loads reviews
src/data_loader.py - Load and Split → Text Preprocessing: cleans and encodes
src/data_loader.py - Training Orchestrator → Load and Split: loads and splits
src/train.py - Training Orchestrator → Text Preprocessing: fits and transforms
src/train.py - Training Orchestrator → RNN LSTM GRU: builds model
src/train.py - RNN LSTM GRU → Model Configuration: uses parameters
src/model.py - Training Orchestrator → Model Configuration: uses settings
src/train.py - Training Orchestrator → Saved Models and Configs: saves model and history
src/train.py - Model Evaluation → Load and Split: loads test data
src/evaluate.py - Model Evaluation → Modular Predictor: checks manual reviews
src/evaluate.py - Model Evaluation → Text Preprocessing: transforms test text
src/evaluate.py - Model Evaluation → Saved Models and Configs: loads model artifacts
src/evaluate.py - Benchmark Charts → Saved Models and Configs: writes comparisons
- Artifact Export → Text Preprocessing: loads tokenizer
src/export_artifacts.py - Artifact Export → Saved Models and Configs: exports deployment files
src/export_artifacts.py - Review Submitter → Streamlit Review App: submits review
README.md - Streamlit Review App → Saved Models and Configs: loads cached artifacts
app/app.py - Streamlit Review App → Sentiment and Confidence: returns sentiment
README.md - Streamlit Review App → RNN LSTM GRU: offers model choices
app/app.py - Modular Predictor → Text Preprocessing: transforms review
src/predict.py - Modular Predictor → Saved Models and Configs: loads model and tokenizer
src/predict.py - Production Inference Engine → Sentiment and Confidence: returns prediction
prediction.py - Production Inference Engine → Saved Models and Configs: loads deployment artifacts
prediction.py - Inference API Re-export → Production Inference Engine: re-exports API
src/prediction.py