Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 60 additions & 35 deletions ISSR_AI4MH_Yixing_Fan/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
**AI-powered Behavioral Analysis for Mental Health Crisis Detection**
GSoC 2025 @ HumanAI
![AI4MH Project Logo](LOGO-1.png)
![Python](https://img.shields.io/badge/Python-3.10+-blue)
![License](https://img.shields.io/badge/License-MIT-green)
![GSoC](https://img.shields.io/badge/GSoC-2025-orange)
---

## 🧠 Overview
Expand Down Expand Up @@ -54,46 +57,68 @@ We build a modular NLP pipeline that:

## 📂 Repo Structure

- 📁 [dataset/](dataset/)
- 📁 [output/](output/)
- 📁 [pipeline/](pipeline/)
- [bert.py](pipeline/bert.py)
- [train_bert_from_unified.py](pipeline/train_bert_from_unified.py)
- [eval_csv_iterator.py](pipeline/eval_csv_iterator.py)
- [eval_large_csv.py](pipeline/eval_large_csv.py)
- [clean_kaggle.py](pipeline/clean_kaggle.py)
- [merge_kaggle.py](pipeline/merge_kaggle.py)
- [split_supervised.py](pipeline/split_supervised.py)
- [fetch_reddit.py](pipeline/fetch_reddit.py)
- [generate_word_bank.py](pipeline/generate_word_bank.py)
- [generate_wordcloud.py](pipeline/generate_wordcloud.py)
- [google_trend_demo.py](pipeline/google_trend_demo.py)
- [test_model.py](pipeline/test_model.py)

- 📁 [results/](results/)
- 📁 [reports/](reports/)
- [midterm_report.ipynb](reports/midterm_report.ipynb)
- [final_report.ipynb](reports/final_report.ipynb)

- 📄 [requirements.txt](requirements.txt)
- 📘 [README.md](README.md)
---

## 🚀 Installation & Setup

### 1️⃣ Clone the Repository
```bash
git clone https://github.com/Shalinis19137/GSoC2025-AI4MH.git
cd GSoC2025-AI4MH
```

### 2️⃣ Create Virtual Environment
```bash
dataset/ # Input datasets
├─ kaggle_clean.csv
├─ Suicidal Ideation Detection Reddit Dataset-Version 2.csv
├─ Suicide_Detection.csv
└─ Suicide_Ideation_Dataset(Twitter-based).csv

output/ # Generated outputs
├─ mental_health_wordcloud.png
├─ sentiment_risk_classified.csv
├─ word_bank.csv
└─ ...

pipeline/ # Core pipeline scripts
├─ bert.py
├─ train_bert_from_unified.py
├─ eval_csv_iterator.py
├─ eval_large_csv.py
├─ clean_kaggle.py
├─ merge_kaggle.py
├─ split_supervised.py
├─ fetch_reddit.py
├─ generate_word_bank.py
├─ generate_wordcloud.py
├─ google_trend_demo.py
└─ test_model.py

results/ # Model checkpoints and evaluation outputs

reports/ # Notebooks and documentation
├─ midterm_report.ipynb
└─ final_report.ipynb

requirements.txt # Python dependencies
README.md # Project description
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
```

### 3️⃣ Install Dependencies
```bash
pip install -r requirements.txt
```

---

## ▶️ Running the Pipeline

### Train BERT Model
```bash
python pipeline/train_bert_from_unified.py
```

### Evaluate Model
```bash
python pipeline/test_model.py
```

---

## 📖 License
This project will use the MIT License unless otherwise specified.
This project is licensed under the MIT License.

---

Expand Down
13 changes: 12 additions & 1 deletion ISSR_Communication_Analysis_Tool_Samuel_Kalu/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,25 @@

import gradio as gr
import pandas as pd
from loguru import logger


from loguru import logger
from src.pipeline import process_all_videos_from_path, process_video
from src.plotting import plot_speaker_charts

required_version = (2, 2, 0)
current_version = tuple(map(int, pd.__version__.split(".")[:3]))

if current_version < required_version:
raise RuntimeError(
f"Incompatible pandas version detected: {pd.__version__}. "
f"Please install pandas>=2.2.0 for Python 3.12 compatibility."
)

warnings.filterwarnings("ignore")



def get_image_base64(path):
with open(path, "rb") as image_file:
encoded = base64.b64encode(image_file.read()).decode("utf-8")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ transformers==4.35.2
torchaudio==2.7.1
librosa==0.10.1
spacy==3.8.7
pandas==2.1.0
pandas>=2.2.0,<3.0
matplotlib==3.8.0
seaborn==0.13.0
openai-whisper==20240930
Expand Down