Inspiration
Mental wellness is an often overlooked but essential part of overall health. In fast-paced environments, people struggle to understand their feelings, track emotional patterns, or find ways to rebalance. We were inspired to build Green Minds to offer a safe, intelligent, and supportive space — a digital companion that not only listens but understands and helps.
With growing advancements in generative AI, we saw an opportunity to bridge the power of LLMs (like Groq and Gemini) with real-world psychological value, creating a holistic toolkit for the mind.
What It Does
Green Minds is a full-stack, AI-powered mental health suite that performs daily mood tracking, sentiment analysis, and delivers personalized wellness recommendations. It features:
Secure Multi-User Journaling: A private, cloud-synced journal for daily reflections.
Dual-Model Emotion Detection: Utilizes transformer models (GoEmotions for multi-label emotion classification and a fine-tuned bertweet model for accurate sentiment analysis) to provide deep insights.
Resilient AI-Powered Content: A robust fallback system using Groq (Llama 3) and Google Gemini powers:
Personalized Stories: Mood-matching short stories, summarized and narrated with Text-to-Speech.
Tailored Activities: Mood-based activity suggestions (short-term, long-term, psychological).
Full Multi-Language Support: Seamless translation across the entire user interface.
Interactive Wellness Toolkit:
A suite of cognitive games, including AI-powered Brain Teasers and Word Scrambles that generate new content on demand.
Mindfulness exercises like a Breathing Pacer and a Guided Body Scan.
Spiritual & Memory Aids:
Geeta Gyaan:Delivers a "Shlok of the Day" from the Bhagavad Gita, complete with Sanskrit text, translation, and meaning from a live API.
My People: A feature to help users document important relationships and memories, serving as a digital memory aid.
Visual Trend Insights: Analyze emotional history and activity scores over time with interactive charts and graphs.
Gamified Motivation: Daily streak counters and a personal scorecard encourage consistent engagement.
How We Built It
Frontend: Streamlit (for its multi-page layout, interactive widgets, and rapid development).
Backend & Database: Python with Google Firestore for secure, real-time, and persistent cloud storage.
Sentiment Analysis:
GoEmotions:A multi-label classifier for detecting up to 28 distinct emotions.
finiteautomata/bertweet-base-sentiment-analysis: A fine-tuned transformer model for accurate positive/negative/neutral sentiment classification, which we map to mental state indicators.
AI Integration:
Groq API (Llama 3):The primary LLM for its exceptional speed in generating real-time game content (riddles, words) and hints.
Google Gemini API:A powerful fallback for all generative tasks, ensuring high availability.
Bhagavad Gita API:A dedicated REST API for the "Geeta Gyaan" daily content.
TTS (Text-to-Speech): gTTS for audio narration of AI-generated stories.
Hosting: Deployed on Streamlit Community Cloud.
Security:All API keys and Firebase credentials are securely managed using Streamlit's secrets management.
Challenges We Ran Into
Model Selection:Initial use of a base BERT model yielded poor results. We pivoted to a fine-tuned sentiment model (bertweet) which dramatically improved accuracy.
API Reliability: Relying on a single LLM provider proved brittle. We engineered a more robust, multi-provider system that attempts calls with Groq first and automatically falls back to Gemini.
Prompt Engineering: Designing precise prompts was critical to get clean, correctly formatted, and emotionally-aligned content from the AI, especially for the dynamic riddle and hint generation.
UI State Management:Ensuring a smooth user experience in interactive games required careful management of Streamlit's session state and the use of dynamic keys to prevent widget conflicts.
What We Learned
Fine-Tuned Models are Key:For specific tasks like sentiment analysis, a fine-tuned model will always outperform a generic base model.
Redundancy Creates Reliability:A multi-provider AI backend (Groq + Gemini) is crucial for building a dependable application that can handle service outages.
Holistic Wellness is Powerful: Combining modern psychological tools (journaling, games) with timeless wisdom (the Bhagavad Gita) creates a uniquely comprehensive and engaging user experience.
Inclusive Design Matters: Integrating multi-language support from the start makes mental wellness tools accessible to a global audience.

Log in or sign up for Devpost to join the conversation.