Skip to content

Deepesh70/Sentiment_Analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MERN + Flask Sentiment Analysis Microservice

This project is a full-stack web application that uses a deep learning (LSTM) model to analyze the sentiment of a movie review.

It is built with a microservice architecture, separating the web server (Node.js) from the AI model server (Python/Flask).

Architecture

This application runs on three separate services:

  1. Client (React + Tailwind): A frontend UI (running on localhost:3000) that provides a textbox for the user.
  2. Node.js Server (Express): A backend server (running on localhost:5000) that serves as a proxy. It receives requests from the React client and forwards them to the Python API.
  3. Python API (Flask): A dedicated AI server (running on localhost:5001) that hosts the trained Keras/TensorFlow $LSTM$ model in memory and exposes a /predict endpoint.

Data Flow: React (Port 3000) $\rightarrow$ Node.js (Port 5000) $\rightarrow$ Python/Flask (Port 5001)

Tech Stack

  • Frontend: React, Tailwind CSS
  • Backend (Web): Node.js, Express
  • Backend (AI): Python, Flask, TensorFlow/Keras
  • Database: None (This project does not use MongoDB)

How to Run

You must run all three services in separate terminals.

1. Python API (AI Server)

# Navigate to the Python API folder
cd python-api

# Set up and activate virtual environment
python3 -m venv venv
source venv/bin/activate 

# Install dependencies
pip install -r requirements.txt 
# (You should create a requirements.txt with: pip freeze > requirements.txt)

# Run the server
python app.py


# (In a new terminal)
cd node-server

# Install dependencies
npm install

# Run the server
node index.js



# (In a third terminal)
cd client

# Install dependencies
npm install

# Run the app
npm start

About

A web based project that analysis positive and negative reviews .

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors