BhaavChitra is an advanced sentiment analysis platform built using Flask and MongoDB. It combines cutting-edge machine learning models like BERT and VADER to analyze and present insights into textual sentiment. The project includes robust database integration and a responsive user interface.
- Sentiment Analysis: Uses a hybrid scoring system to combine BERT and VADER outputs for precise results.
- Dynamic Sentiment Display: Sentiment is highlighted with color-coded indicators (green for positive, red for negative, gray for neutral).
- MongoDB Integration: Stores user data, session information, and sentiment analysis history.
- Customizable Models: Easily swap models via environment configuration.
- Responsive Design: Dynamic navigation bar and mobile-friendly layout.
Before installing BhaavChitra, ensure you have the following:
- Python 3.10 or 3.11 (3.11 recommended)
- pip (Python package installer)
- MongoDB (for database storage)
- Git (for cloning the repository)
-
Clone the Repository:
git clone https://github.com/yourusername/bhaavchitra.git cd bhaavchitra
-
Run the Setup Script:
python setup.py
-
Activate the Virtual Environment:
- Windows:
.venv\Scripts\activate
- macOS/Linux:
source .venv/bin/activate
- Windows:
-
Install Required Dependencies:
pip install -r requirements.txt
-
Configure Environment Variables: Use the
.env
file in the root directory for environment configuration. Refer to.env-guide
for details on how to set up:- MongoDB URI
- Flask server configurations
- NLTK and model paths
Start the Flask server:
flask run
-
Dependency Conflicts:If you encounter issues installing packages, force reinstall:
pip install --upgrade --force-reinstall -r requirements.txt
-
NLTK Errors:If you face issues related to NLTK paths, deactivate the virtual environment and rerun the application:
deactivate
-
MongoDB Connection Errors: Ensure your MongoDB server is running and the URI in
.env
is correctly configured.
- Prerequisites installed
- Virtual environment created and activated
- Dependencies installed
- Environment variables set
- MongoDB server running
- Application running
The database schema for MongoDB is as follows:
- id: Primary Key
- email: User's email address
- password: Securely hashed password
- created_at: Timestamp of account creation
- is_google_user: Boolean flag to indicate if the user logged in via Google
bhaavchitra/
├── python_service/ # Main backend service
│ ├── __init__.py # Application initialization
│ ├── app.py # Main Flask app
│ ├── bert.py # BERT sentiment logic
├── public/ # Static and dynamic resources
│ ├── CSS/ # CSS files for styling
│ ├── JS/ # JavaScript files for functionality
│ ├── @resources/ # Images and assets
│ ├── bhaavchitra.html # Main application page
│ ├── index.html # Landing page
│ ├── about.html # About page
│ ├── login.html # Login page
├── .env # Environment configuration
├── requirements.txt # Python dependencies
├── setup.py # Setup script for initialization
├── dummydata.txt # Sample data for testing
- Support for multilingual sentiment analysis.
- Improved data visualizations for sentiment trends.
- Secure password resets and account management.
- Enhanced role-based access control (e.g., admin and user roles).
For commercial and educational use, please note the following:
- License: This system is available under the GNU General Public License v3.0 (GPL-3.0).
- Copyright: Copyright © 2024 Manju Madhav V A and Nishanth K R. All rights reserved.
- Where to Find the Product: The source code and documentation will be available on GitHub.
- Contact: For inquiries or support, please contact us via email: manjumadhav.va@gmail.com or nishanthkr1409@gmail.com.
Copyright © 2024 Manju Madhav V A and Nishanth K R.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.