Skip to content

onurcangnc/whatsapp_chat_analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

89 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WhatsApp Chat Analyzer

Overview

The WhatsApp Chat Analyzer is a web-based application that allows users to upload WhatsApp chat logs in .txt format and analyze them. The application processes the chat data and generates insights such as average reply times, message counts, and more. Additionally, users can upload CSV or Excel files to further analyze the data and download a psychological report on the chat participants.

Features

  • Upload WhatsApp chat logs in .txt format for analysis.
  • Upload CSV/Excel files for advanced analysis.
  • Download processed chat data in CSV format.
  • Generate psychological reports from CSV/Excel data.
  • Responsive design and clean user interface using Bootstrap.
  • Includes validation for file types before uploading.

Tech Stack

  • Backend: Flask (Python) Flask
  • Frontend: HTML, CSS, JavaScript, jQuery, Bootstrap HTML5 CSS3 JavaScript jQuery Bootstrap
  • Processing: Pandas for CSV/Excel data manipulation Pandas
  • Deployment: Gunicorn, Heroku Gunicorn Heroku
  • AI Integration: OpenAI GPT-4 API for human psychology report generation OpenAI

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/whatsapp-chat-analyzer.git
   cd whatsapp-chat-analyzer
  1. Install dependencies:
  • You can find all dependencies in requirements.txt. Install them using pip:
pip install -r requirements.txt
  1. Set up environment variables:
  • Create a .env file in the project root and define the following variables:
FLASK_SECRET_KEY=your_secret_key
OPENAI_API_KEY=your_openai_api_key
  1. Run the app locally:
flask run
The app will be available at http://127.0.0.1:5000/.
  1. Deploy on Heroku:
  • Use the Procfile provided for deployment on Heroku.
heroku create
git push heroku master

Usage

  1. Uploading a WhatsApp chat log:

  2. Browse and select a .txt file containing a WhatsApp chat export. Once uploaded, the chat log will be processed and analyzed. Download CSV:

  3. After processing the chat log, you can download the analyzed data as a CSV file.

  4. Generating Psychological Report:

  • You can also upload CSV/Excel files to generate psychological reports about the chat participants.

File Structure

  • app.py: Contains the Flask server logic and routes.

  • requirements.txt: Lists the Python dependencies required for the project.

  • Procfile: Configuration for deploying on Heroku.

  • static/: Contains static files such as custom CSS (style.css) and JavaScript (script.js).

  • templates/: Contains HTML templates such as index.html. Contributing

Contributing

  • Feel free to fork the project, open issues, and submit pull requests. For major changes, please open an issue first to discuss what you would like to change.

Author: Onurcan Genç

Portfolio

This `README.md` covers the project overview, installation, usage, and deployment steps while including relevant details from the files you uploaded. Let me know if you'd like any changes!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published