Spaces:
Sleeping
Sleeping
| title: Refeel | |
| emoji: π₯ | |
| colorFrom: green | |
| colorTo: red | |
| sdk: gradio | |
| sdk_version: 5.33.1 | |
| app_file: app.py | |
| pinned: false | |
| license: cc-by-4.0 | |
| short_description: 'π Refeel β Re-feel your emotions. Reframe your story: AI Di' | |
| # π Refeel β Re-feel your emotions. Reframe your story: AI Diary & Smart Chat | |
| **A smart AI-powered diary web app for the Hugging Face MCP Hackathon.** | |
| Modern individuals often miss the opportunity to deeply reflect on their emotions and experiences in the midst of a rapidly changing environment. Although emotional journaling is a powerful tool for emotional stability and self-understanding, many people struggle to maintain a consistent writing habit or to analyze their own behavioral patterns. | |
| This project aims to build an AI-powered self-reflection journaling service that leverages Large Language Models (LLMs) and Retrieval-Augmented Generation (RAG) technology to help users easily write journal entries and identify recurring emotional patterns or cognitive traps in their thoughts. | |
| Refeel is a web app that allows users to write, search, and analyze their diary entries, and engage in meaningful conversations with an empathetic, psychologically-informed AI assistant. | |
| [βΆοΈ Watch Demo (mp4)](./gradio-screen-recording-2025-06-10T03-00-19.mp4) | |
| <iframe width="560" height="315" src="https://www.youtube.com/embed/6qaRf_5kofc?si=0XzhztYB4MAfPwuY" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe> | |
| --- | |
| ## π Features | |
| - **βοΈ Write Diary**: | |
| Freely write down your thoughts and feelings each day. Each diary entry is vector-embedded and stored in Qdrant. | |
| - **π Search Diary**: | |
| Search your past diary entries by keyword or semantic similarity. | |
| - **π§ AI Analysis & Coaching**: | |
| After saving an entry, receive instant feedback and kind, realistic advice from the AI. | |
| *(Powered by LangChain + Groq LLM)* | |
| - **π€ Smart Chat**: | |
| Have personalized conversations with the AI, which references your saved diary entries for context. | |
| - **π Multilingual Embedding**: | |
| Diary entries are vectorized using a multilingual sentence transformer. | |
| --- | |
| ## π οΈ Tech Stack | |
| | Component | Technology | | |
| |------------------|------------------------------------------------| | |
| | Frontend/Backend | [Gradio](https://gradio.app/) (Python) | | |
| | Vector DB | [Qdrant Cloud](https://qdrant.tech/) | | |
| | LLM | [Groq API](https://groq.com/) (OpenAI-compatible) | | |
| | Embeddings | `sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2` | | |
| | LLM Framework | [LangChain](https://www.langchain.com/) | | |
| --- | |
| ## π Installation | |
| 1. **Clone the repository** | |
| ```bash | |
| git clone https://huggingface.co/spaces/thisispaperdoll/refeel . | |
| ``` | |
| 2. **Install required packages** | |
| ```bash | |
| pip install gradio qdrant-client sentence-transformers langchain langchain_groq | |
| ``` | |
| 3. **Set API keys** | |
| - Open `app.py` and set your Qdrant and Groq API keys. | |
| 4. **Run the app** | |
| ```bash | |
| python app.py | |
| ``` | |
| - To enable auto-reload on code changes: | |
| ```bash | |
| python app.py --reload | |
| ``` | |
| or | |
| ```python | |
| demo.launch(reload=True) | |
| ``` | |
| --- | |
| ## π‘ Usage Guide | |
| - **Write Diary** | |
| In the "βοΈ Write Diary" tab, enter a title and content, then click "Save Diary". | |
| - **Get AI Feedback** | |
| After saving, the AI provides instant emotional analysis and coaching. | |
| - **Continue Chatting** | |
| Go to the "π€ Smart Chat" tab to have a deeper conversation with the AI using your diary context. | |
| - **Search Diary** | |
| Use the "π Search Diary" tab to find entries based on keywords. | |
| --- | |
| ## π¬ AI Prompt Example | |
| The AI assistant is designed to: | |
| - Empathize and give encouragement | |
| - Detect cognitive distortions and emotional patterns | |
| - Compare with similar past diary entries | |
| - Summarize psychological traps | |
| - Provide friendly and realistic advice suitable for your age | |
| --- | |
| ## π Hackathon Context | |
| This project was developed for the **Hugging Face MCP Hackathon**. #agent-demo-track | |
| It showcases a personalized, psychologically-aware coaching experience by combining vector search, LLMs, and user context. | |