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.
- 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.
- Backend: Flask (Python)
- Frontend: HTML, CSS, JavaScript, jQuery, Bootstrap
- Processing: Pandas for CSV/Excel data manipulation
- Deployment: Gunicorn, Heroku
- AI Integration: OpenAI GPT-4 API for human psychology report generation
- Clone the repository:
git clone https://github.com/yourusername/whatsapp-chat-analyzer.git
cd whatsapp-chat-analyzer
- Install dependencies:
- You can find all dependencies in
requirements.txt
. Install them using pip:
pip install -r requirements.txt
- 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
- Run the app locally:
flask run
The app will be available at http://127.0.0.1:5000/.
- Deploy on Heroku:
- Use the
Procfile
provided for deployment on Heroku.
heroku create
git push heroku master
-
Uploading a WhatsApp chat log:
-
Browse and select a
.txt
file containing a WhatsApp chat export. Once uploaded, the chat log will be processed and analyzed. Download CSV: -
After processing the chat log, you can download the analyzed data as a CSV file.
-
Generating Psychological Report:
- You can also upload CSV/Excel files to generate psychological reports about the chat participants.
-
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
- 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ç
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!