This is a sentiment analysis web application that utilizes a fine-tuned model to classify statements into three categories: Political, Regional, and Sports. The application is built using React for the frontend and Python/Node.js/Express.js for the backend. This application also detects postive and negative statements used to detect social media sentiment detection.
- Classifies statements into Political, Regional, or Sports categories.
- Utilizes a fine-tuned model for accurate sentiment analysis.
- Supports database integration with tables for
resultsandusers.
npm install
pip install -r requirements.txtRun the training script with the provided dataset:
python train_model.py- Create a database in MySQL.
- Execute the SQL commands below to create the required tables:
CREATE TABLE users (
id INT AUTO_INCREMENT PRIMARY KEY,
username VARCHAR(100),
email VARCHAR(100),
password_hash VARCHAR(255)
);
CREATE TABLE results (
id INT AUTO_INCREMENT PRIMARY KEY,
user_id INT,
input_text TEXT,
category VARCHAR(50),
FOREIGN KEY (user_id) REFERENCES users(id)
);- Frontend
npm start- Start the Python backend:
python app.py- Start the Node.js server:
node --experimental-modules server.mjs