This is a simple web application built with Flask that predicts the sentiment (positive or negative) of IMDb movie reviews using a pre-trained Multinomial Naive Bayes classifier.
The application takes user input in the form of a movie review and predicts whether the sentiment of the review is positive or negative based on a pre-trained machine learning model. The model was trained on IMDb movie review data using a combination of text vectorization with CountVectorizer and classification with Multinomial Naive Bayes.
To use the application, follow these steps:
-
Clone the repository:
git clone https://github.com/Gaurav7506/review-sentiment-analysis.git Navigate to the project directory:
-
Install dependencies (Flask, scikit-learn, etc.):
-
Run the Flask application:
-
Open your web browser and go to http://127.0.0.1:5000 to access the application.
-
Enter a movie review in the input field and submit the form to see the predicted sentiment.
app.py: The main Flask application file containing routes and model loading.
Naive_Bayes_model_imdb.pkl: Pickled Multinomial Naive Bayes model trained on IMDb movie review data.
countVect_imdb.pkl: Pickled CountVectorizer used for text vectorization during model training.
templates/: Directory containing HTML templates for rendering the web pages.
home.html: HTML template for the home page with the input form..
result.html: HTML template for displaying the prediction result.