Skip to content

Keertilata20/talkspace-ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

90 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

A calm digital space where thoughts feel safe to be shared.

🌿 Your companion Nira is here to listen.

Built with emotionally-aware AI, real-time UI adaptation, and human-centered design.


πŸš€ Live Demo

πŸ‘‰ Try TalkSpace Live: https://talkspace-ai.streamlit.app/

πŸŽ₯ Demo


🏷 Tech Stack & Badges

Python Streamlit Scikit-Learn NLP LLM Supabase UI Status


🌱 The Idea

TalkSpace is designed as a calm digital environment for conversation.

Unlike traditional chatbots focused on quick answers, TalkSpace focuses on:

  • helping users feel heard
  • maintaining natural, human-like dialogue
  • offering gentle, supportive responses

The goal is not just interaction -- but emotional presence.


✨ Core Features

🌿 AI Companion – Nira

  • Conversational agent designed for warmth and empathy
  • Supports dual modes: Supportive Friend / Counselor

🧠 Emotion Awareness

  • Detects emotional signals (loneliness, stress, anxiety, etc.)
  • Adapts tone and response dynamically

🎨 Emotion-Aware UI

  • Sidebar reflects real-time emotional state

  • Includes:

    • 🌿 β€œRight now” summary
    • 🧘 Mood ring (color-based state)

🚨 Crisis Detection System

  • Identifies high-risk emotional signals
  • Overrides normal flow with supportive responses
  • Updates UI to reflect critical state

πŸ’¬ Conversation Intelligence

  • Maintains short-term conversational memory
  • Context-aware responses using recent messages

πŸ—‚ Multi-Conversation Support

  • Create, switch, and persist multiple chats
  • Backed by Supabase

🌬 Calm Tools

  • Guided breathing
  • Grounding interactions

🌱 Gentle Reminders

  • Soft affirmations for a supportive environment

🧠 System Architecture

TalkSpace uses a hybrid approach combining machine learning with conversational logic.

Pipeline

User Input β†’ Emotion Detection β†’ Response Strategy β†’ LLM Generation β†’ Memory Update β†’ UI Sync

🧩 Key Components

Component Description
Emotion Detection Identifies emotional signals using keyword logic
Response Strategy Engine Selects response type based on emotion + intensity
LLM Layer (OpenRouter) Generates natural, human-like responses
Conversation Memory Maintains short-term conversational context
Crisis Detection Layer Overrides flow for high-risk situations
UI Layer (Streamlit) Real-time emotional visualization

βš™οΈ Technical Highlights

  • Built a real-time emotion tracking system that synchronizes UI and conversation state
  • Implemented state-driven UI rendering using Streamlit session management
  • Developed a priority-based response system (crisis overrides normal flow)
  • Integrated LLM-based response generation with contextual memory
  • Engineered multi-conversation persistence using Supabase
  • Optimized for natural conversation flow by reducing repetition

βš™οΈ Tech Stack

Category Tools
Language Python
Framework Streamlit
ML Library Scikit-learn
Database Supabase
LLM API OpenRouter

πŸš€ Running Locally

git clone https://github.com/Keertilata20/talkspace-ai
cd talkspace-ai
pip install -r requirements.txt
streamlit run app.py

πŸ”­ Future Improvements

  • animated mood ring based on intensity
  • deeper emotional understanding
  • improved long-term memory
  • voice-based interaction
  • enhanced calming experiences

⚠️ Disclaimer

TalkSpace is not a medical or diagnostic tool.

If you are experiencing severe emotional distress, please consider reaching out to a trained professional or someone you trust.


πŸ‘€ Author

Built with care while exploring:

AI β€’ conversation design β€’ human-centered technology

🌿

About

Emotion-aware AI companion designed for natural, human-like conversation. TalkSpace combines machine learning, LLMs, and real-time UI adaptation to create a calm, supportive space where users feel heard β€” not analysed 🌿

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages