This application utilizes Artificial Neural Networks (ANN), Recurrent Neural Networks (RNN), and Transformer models to detect and analyze sentiment in user-provided reviews. Users can input reviews manually or upload a CSV file for bulk analysis. The application is built using Streamlit, making it user-friendly for interactive prediction tasks.
- βοΈ Manual Review Input: Users can type or paste a single review and get the sentiment analysis in real-time.
- π Bulk Review Processing: Users can upload a CSV file containing multiple reviews to get batch sentiment predictions.
- π Model Selection: Choose between ANN, RNN, and Transformer models for sentiment prediction.
- π Visual Analytics: Generates bar plots showing the distribution of sentiments across the reviews.
Ensure you have the following installed:
- π Python 3.8 or newer
- π Streamlit
- π§ TensorFlow
- π Scikit-learn
- πΌ Pandas
- π’ Numpy
- π Matplotlib
- ποΈ Joblib
To run the application, navigate to the app folder in the terminal and run:
streamlit run main.py- π Choose Model: Select the prediction model from a dropdown.
- π₯ Choose Mode: Choose either 'Manual Input' for single review predictions or 'Upload CSV' for bulk predictions.
- β‘ Detect Sentiment: After entering a review or uploading a file, click this button to generate predictions.
For CSV uploads, ensure your data is formatted with a column named 'review' containing the text entries for analysis.
Example:
review
"I love this product!"
"Terrible customer service."
The models used in this application are trained using separate notebooks:
π LSTMANDANN.ipynbfor the ANN and RNN models.π transformer.ipynbfor the Transformer model.
Ensure these models are correctly loaded from the models directory.