TalkHeal is an empathetic, intelligent, and interactive mental health support assistant. Built with Python and Streamlit, it provides a safe, non-judgmental space for users to track their emotional well-being, learn coping strategies, and access professional guidance when needed. It offers 24/7 support, emotional journaling, resource guidance, and AI-powered conversations powered by Googleβs Gemini.
Mental health is a fundamental component of overall health and well-being, underpinning our ability to cope with life's stresses, realize our potential, and contribute to our communities. In today's fast-paced world, challenges such as economic downturns, social isolation, and rapid lifestyle changes can undermine mental health. Many people face serious conditions like depression and anxiety, which are increasingly common globally and can lead to significant distress and impairment in daily functioning.
The vision for TalkHeal is to address these challenges by providing accessible, precise, and personalized mental health support through the seamless integration of technology and human-centric design. We believe that every individual deserves a safe space to explore their emotions and access tools that empower their wellness journey. TalkHeal is more than just a chatbot; it is a holistic mental health companion designed to fill a crucial gap in care and support.
-
Empathetic Conversations, Anytime, Anywhere: Many people are reluctant to talk about their feelings due to stigma or embarrassment. TalkHeal offers a private, non-judgmental space where users can engage in supportive conversations 24/7. The ability to choose an AI personalityβfrom a "Compassionate Listener" to a "Motivating Coach"βensures that the interaction is tailored to what the user needs most at that moment. This personalized approach helps build trust and encourages users to be open and honest about their experiences.
-
Proactive Self-Management: TalkHeal empowers users to take an active role in their well-being. The Mood Dashboard helps them identify patterns and triggers in their emotional life, providing insights that can inform healthier choices. Tools like the Focus Session, Breathing Exercises, and Yoga Recommendations offer practical coping strategies to manage stress, anxiety, and frustration in real-time. The goal is to move beyond simply reacting to distress and instead build psychological resilience and proactive wellness habits.
-
Connecting to Real-World Support: While TalkHeal provides a valuable first step, it is not a substitute for professional care. Our vision includes acting as a bridge to professional help. The platform includes a Doctor Specialist Recommender to help users understand potential symptoms and find a suitable professional, as well as a Crisis Help page that provides immediate access to local and international hotlines in case of a mental health emergency. This two-pronged approach ensures that users are always supported, whether through our digital tools or by connecting with human professionals.
In essence, TalkHeal aims to destigmatize mental health, promote self-awareness, and make evidence-based support accessible to everyone. By integrating compassionate AI with a comprehensive toolkit of wellness resources, TalkHeal seeks to become a trusted companion on the journey toward a healthier and more balanced life.
Experience TalkHeal live here:
π
- Gemini-powered chatbot: The core of the app is an AI companion built on Google's Gemini models (
gemini-2.5-pro
andgemini-2.0-flash
). - Chatbot Personality Tone Selector: You can personalize the AI's approach by choosing from five distinct tones: Compassionate Listener, Motivating Coach, Wise Friend, Neutral Therapist, and Mindfulness Guide.
- Session Management: The app allows you to create, title, and manage multiple chat sessions, which are saved in JSON files for persistence and privacy via IP-based isolation.
- Session Feedback & Emotional Closure: After a chat session, you can provide feedback on your experience and receive an emotional closure message.
- Interactive Mood Dashboard: Track your emotional state with a five-level mood scale and visualize your mood history, trends, and patterns over time with interactive charts. The dashboard analyses mood by day of the week, time of day, and common contexts or activities.
- Personal Journaling: Write and save private journal entries to a secure SQLite database. The app analyzes the sentiment of each entry (Positive, Neutral, Negative) and allows you to filter and review past thoughts.
- AI-Assisted Coping Tips: Based on your selected mood, the app provides instant coping tips and micro-journaling prompts to guide your reflection.
- Yoga Recommendations: An innovative tool that analyzes your emotional state and generates tailored yoga pose recommendations with step-by-step instructions in a structured JSON format.
- Focus Sessions: Use a customizable timer for a Pomodoro session or a mindful break. Sessions come with a visual breathing animation, motivational quotes, and optional calming background audio.
- Breathing Exercises: A simple and guided exercise with a visual animation to help you relax and regulate your breathing.
- Quick Coping Cards: Instantly generate randomized coping strategies for grounding, mindfulness, movement, reflection, and creative expression. You can save your favorites for later use.
- Wellness Hub: A central hub providing simple wellness tips across five categories: Mind, Body, Nutrition, Sleep, and Stress Relief. It also includes a quick self-check, a daily planner, and a mood tracker.
- Emergency Help: An "Emergency Help" page provides immediate access to local crisis support by dynamically searching for resources based on your location. It also lists a comprehensive directory of global crisis hotlines.
- Doctor Specialist Recommender: This tool uses multiple machine learning models (e.g., Logistic Regression, SVM, Random Forest) to suggest potential diseases based on user-input symptoms and recommends a suitable medical specialist.
- Mental Health Quizzes: Integrated PsyToolkit-verified quizzes (GAD-7, PHQ-9, WHO-5) for self-evaluation of anxiety, depression, and overall well-being.
- Dynamic Theme System: Choose from multiple soothing color palettes and switch between Light and Dark modes with a single click.
- Glassmorphic Design: The UI features a 3D-inspired glassmorphic style with blurred, translucent containers and smooth transitions for a visually calming experience.
- Customizable User Profile: Create a user profile with a name and profile picture, and set your preferred font size for the entire application.
The application uses SQLite databases for user management and journaling. These databases are automatically created when you first run the application, but you can also set them up manually:
The databases will be created automatically when you run the application for the first time.
If you want to set up the databases manually, run:
python setup_database.py
This will create:
users.db
- User authentication and profile datajournals.db
- User journal entries and mood tracking data
Note: Database files (.db
) are automatically ignored by git to prevent conflicts and protect user data.
For a detailed walkthrough of TalkHeal's features and how to use them, check out this video:
[Video Coming Soon]
ποΈ Click to view detailed project architecture
TalkHeal/
βββ .devcontainer/ # Dev container configuration (for VS Code)
βββ .github/ # GitHub workflows and issue templates
βββ .streamlit/
β βββ secrets.toml # Streamlit secrets (API keys, credentials)
βββ assets/
β βββ pink.png
β βββ yoga_animation.json
βββ audio/
βββ audio_files/
βββ auth/
β βββ auth_utils.py # Authentication functions (login, register)
β βββ users.yaml # User credentials and roles (YAML format)
βββ components/
β βββ Breathing_Exercise.py
β βββ __init__.py
β βββ chat_interface.py
β βββ emergency_page.py
β βββ focus_session.py
β βββ header.py
β βββ login_page.py
β βββ mood_dashboard.py
β βββ profile.py
β βββ sidebar.py
β βββ theme_toggle.py
βββ core/
β βββ __init__.py
β βββ config.py # Central app configuration
β βββ theme.py
β βββ utils.py # Common helper functions
βββ css/
β βββ styles.py
βββ data/
β βββ Yoga.json # Yoga session data (poses, flows)
βββ favicon/
β βββ apple-touch-icon.png
β βββ favicon-96x96.png
β βββ favicon.ico
β βββ favicon.svg
β βββ site.webmanifest
β βββ web-app-manifest-192x192.png
β βββ web-app-manifest-512x512.png
βββ pages/
β βββ About.py
β βββ Journaling.py # Journaling UI page
β βββ Yoga.py # Yoga activity page
β βββ selfHelpTools.py # Tools/resources for self-help
βββ .gitignore # Files/folders ignored by Git
βββ Background.jpg
βββ Background_Dark.jpg
βββ CODE_OF_CONDUCT.md # Contribution behavior guidelines
βββ CONTRIBUTING.md # Instructions for contributing
βββ LICENSE # License for the project (e.g., MIT)
βββ MOOD_TRACKING_README.md # Info about the mood tracking feature
βββ README.md # Main project documentation
βββ TalkHeal.pptx # Presentation for TalkHeal
βββ TalkHeal.py # π· Main app entry point (Streamlit)
βββ TalkHealLogo.png
βββ blue.png
βββ blue_ss.jpg
βββ dark.png
βββ dark_ss.jpg
βββ generate_audio.py # Script to convert text to speech/audio
βββ journals.db # Database of user journal entries
βββ lav_ss.jpg
βββ lavender.png
βββ light_ss.jpg
βββ mint.png
βββ requirements.txt # Python package dependencies
βββ streamlit.toml # Streamlit configuration
βββ test_mood_dashboard.py # Test cases for mood dashboard
βββ users.db # Database for user authentication
Clone and run locally using Python and Streamlit.
-
Clone the repository:
git clone https://github.com/eccentriccoder01/TalkHeal.git cd TalkHeal
-
Install dependencies:
pip install -r requirements.txt
-
Set up API key: Go to your Streamlit Secrets Settings and add:
GEMINI_API_KEY = "YOUR_GOOGLE_GEMINI_API_KEY"
-
Run the app:
streamlit run TalkHeal.py
Report bugs and issues or propose improvements through our GitHub repository.
-
Firstly Star(β) the Repository
-
Fork the Repository and create a new branch for any updates/changes/issue you are working on.
-
Start Coding and do changes.
-
Commit your changes
-
Create a Pull Request which will be reviewed and suggestions would be added to improve it.
-
Add Screenshots and updated website links to help us understand what changes is all about.
-
Check the CONTRIBUTING.md for detailed steps...
We welcome all contributions and suggestions! Whether it's a new feature, design improvement, or a bug fix β your voice matters π
Your insights are invaluable to us. Reach out to us team for any inquiries, feedback, or concerns.
Thanks to these wonderful people for contributing π
This project is open-source and available under the MIT License.
Developed by Eccentric Explorer
Feel free to reach out with any questions or feedback! Thanks for reading, here's a cookiepookie: