1 of 9

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

​

2 of 9

The Problem

  • Many people struggle with stress, anxiety, or low mood.�
  • Access to human therapists is often expensive or limited.�
  • There’s a need for a 24/7 emotional support tool that listens and responds kindly.

​

3 of 9

The Idea

Create an AI-powered therapist app that:�

  • Listens to how the user feels.�
  • Responds with empathy and encouragement.�
  • Helps improve mood and confidence through conversation.�

Built for WAICY AI Innovation Challenge.

​

4 of 9

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 .

​

5 of 9

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.

​

6 of 9

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"]

​

​

7 of 9

Cont..

Inputs: user’s message (like “I feel anxious”).�

Processing: Hugging Face model interprets the emotion.�

Output: Returns a comforting AI-generated reply.

​

8 of 9

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 ❤️

​

9 of 9

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

​

​