AI Therapist: "Healing starts with a single conversation."
Helping users manage emotions, regain confidence, and find hope using AI
By: Abdullah Faheem, Haziq Mahmood and Fizzah Bilal
https://huggingface.co/spaces/usama68/ai_therapist
The Problem
The Idea
Create an AI-powered therapist app that:�
Built for WAICY AI Innovation Challenge.
Technologies Used
Frontend/UI: Gradio (Python library to make web apps easily).�
AI Model: Hugging Face model – “google/gemma-2b-it” (instruct model trained for dialogue).�
Backend Integration: Hugging Face API (token-based access).�
Programming Language: Python 🐍.�
Hosting Platform: Hugging Face Spaces .
How It Works
User opens the app and types how they feel.�
The app sends the message to an AI model hosted on Hugging Face.�
The AI model processes the input and generates a supportive response.�
The user sees the therapist’s response instantly on the interface.�
The conversation continues — like a mini therapy chat session.
Code Explanation
def talk_to_therapist(message):
headers = {"Authorization": f"Bearer {HF_TOKEN}"}
payload = {
"model": MODEL,
"inputs": f"You are a kind and calming therapist helping someone who feels low: {message}"
}
response = requests.post(API_URL, headers=headers, json=payload)
return response.json()["generated_text"]
Cont..
Inputs: user’s message (like “I feel anxious”).�
Processing: Hugging Face model interprets the emotion.�
Output: Returns a comforting AI-generated reply.
User Interface
Built with Gradio, a simple Python tool for making AI apps interactive.�
Clean and minimal design with two chat boxes.�
Includes motivational quote & welcome screen to set a positive tone.�
Easy to use — type → get support → feel better ❤️
Impact & Vision
Provides free, accessible emotional support to anyone, anywhere.�
Can be expanded with voice chat, emotion detection, or journaling features.�
A step towards AI for emotional well-being 🌿�https://huggingface.co/spaces/usama68/ai_therapist