This project provides a web application that utilizes an Artificial Neural Network (ANN) for sentiment classification of movie reviews. The application is built with Flask and containerized using Docker.
- Sentiment classification using an ANN model
- Web interface for submitting movie reviews
- REST API for programmatically accessing the classification service
- Docker installed on your system
-
-
Clone the repository:
git clone https://github.com/mokaddemhicham/Text-Mining-Classification-using-Artificial-Neural-Networks.git cd Text-Mining-Classification-using-Artificial-Neural-Networks
-
Build the Docker image:
docker build -t ann-web-app
-
Run the Docker container:
docker run -p 5000:1000 ann-web-app
-
-
-
Pull the Docker image:
docker pull mokaddemhicham/flask-ann-app:latest
-
Run the Docker container:
docker run -d -p 5000:1000 --name flask-ann-app-container mokaddemhicham/flask-ann-app:latest
-
-
Access the web application:
Open your web browser and navigate to
http://localhost:5000
. -
Submit a movie review:
Enter your movie review in the text box. Click the
Predict
button to see the sentiment classification result.
The application provides a REST API for sentiment classification as well.
-
- Request (JSON):
{ "review": "This is a sample movie review." }
- Response (JSON):
{ "sentiment": "positive" }
- Request (JSON):
Text-Mining-Classification-using-Artificial-Neural-Networks/
├── mo.tf/ # The ANN model
├── static/
| ├── autotyping/ # JavaScript files for auto-typing effect
│ ├── bootstrap/ # Bootstrap CSS and JS files
├── templates/
│ ├── index.html # The web interface template
├── app.py # The Flask application
├── Dockerfile # Docker image configuration
├── requirements.txt # Required Python packages
└── README.md
This file defines how the Docker image is built.
The requirements.txt
file lists the necessary Python libraries:
Flask==2.3.2
numpy==1.26.2
tensorflow==2.15.0
tensorflow-datasets==4.9.4
waitress
We welcome contributions! Feel free to open an issue or submit a pull request.
For any inquiries or support, please contact Hicham Mokaddem or Mohamed Louak.