From 0745b3e16d8be645a3ad25d2ee78c26a3dd9a150 Mon Sep 17 00:00:00 2001 From: Shalini kumari Date: Wed, 25 Feb 2026 23:34:27 +0530 Subject: [PATCH 1/2] Fix pandas compatibility for Python 3.12 and update app.py OR requirement.txt --- ISSR_Communication_Analysis_Tool_Samuel_Kalu/app.py | 13 ++++++++++++- .../requirements.txt | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ISSR_Communication_Analysis_Tool_Samuel_Kalu/app.py b/ISSR_Communication_Analysis_Tool_Samuel_Kalu/app.py index 89a9358..479cc9e 100644 --- a/ISSR_Communication_Analysis_Tool_Samuel_Kalu/app.py +++ b/ISSR_Communication_Analysis_Tool_Samuel_Kalu/app.py @@ -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") diff --git a/ISSR_Communication_Analysis_Tool_Samuel_Kalu/requirements.txt b/ISSR_Communication_Analysis_Tool_Samuel_Kalu/requirements.txt index cf01824..4da5ada 100644 --- a/ISSR_Communication_Analysis_Tool_Samuel_Kalu/requirements.txt +++ b/ISSR_Communication_Analysis_Tool_Samuel_Kalu/requirements.txt @@ -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 From efdc888aabdecbca6e0e2f7b69d17f53c8e63e90 Mon Sep 17 00:00:00 2001 From: Shalini kumari Date: Thu, 26 Feb 2026 00:34:00 +0530 Subject: [PATCH 2/2] Enhance README navigation by linking files (fixes #30) --- ISSR_AI4MH_Yixing_Fan/README.md | 95 +++++++++++++++++++++------------ 1 file changed, 60 insertions(+), 35 deletions(-) diff --git a/ISSR_AI4MH_Yixing_Fan/README.md b/ISSR_AI4MH_Yixing_Fan/README.md index 4ee742f..fb70ed5 100644 --- a/ISSR_AI4MH_Yixing_Fan/README.md +++ b/ISSR_AI4MH_Yixing_Fan/README.md @@ -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 @@ -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. ---