This project deploys a Machine Learning model to predict the sentiment of movie reviews using a Flask web application. Users can input movie details via a web GUI or API calls and get the predicted sentiment.
The project consists of five main components:
-
imdb.py
Contains the Machine Learning model code to predict sentiment based on training data from theIMDB.csvfile. -
app.py
Flask application that exposes APIs. It receives movie details, computes the predicted sentiment using the model, and returns the result. -
templates&staticfoldertemplatescontains the HTML templates for the web interface.staticcontains CSS, JS, and other static files.
Users can enter movie details and view predicted sentiment through these templates.
-
rdb
SQLite database file used by Flask via Flask-SQLAlchemy to store movie reviews and predictions. -
svm.pklandtfidf.pkl
Pickled files containing the trained SVM model and TF-IDF vectorizer, used for sentiment prediction.
-
Setup
- Unzip the project folder to your local system.
- Make sure Python and required packages (Flask, scikit-learn, pandas, etc.) are installed.
-
Start Flask API
python app.py