From 3735946ad0bf19100b16fa6fc8ffae9df516d1d4 Mon Sep 17 00:00:00 2001 From: priyanshm07 Date: Mon, 31 Mar 2025 13:11:47 +0530 Subject: [PATCH] fix : Readme, requirements.txt added --- .../ai_breakup_recovery_agent/.gitignore | 42 ------- .../ai_breakup_recovery_agent/README.md | 115 ++++++++++++++++++ .../ai_breakup_recovery_agent/app.py | 2 - .../requirements.txt | 3 + 4 files changed, 118 insertions(+), 44 deletions(-) delete mode 100644 ai_agent_tutorials/ai_breakup_recovery_agent/.gitignore create mode 100644 ai_agent_tutorials/ai_breakup_recovery_agent/README.md create mode 100644 ai_agent_tutorials/ai_breakup_recovery_agent/requirements.txt diff --git a/ai_agent_tutorials/ai_breakup_recovery_agent/.gitignore b/ai_agent_tutorials/ai_breakup_recovery_agent/.gitignore deleted file mode 100644 index cb4801b..0000000 --- a/ai_agent_tutorials/ai_breakup_recovery_agent/.gitignore +++ /dev/null @@ -1,42 +0,0 @@ -# Python-related -__pycache__/ -*.pyc -*.pyo -*.pyd -*.db -*.sqlite3 -*.log -*.json - -# Environment and secrets -.env -*.env - -# Streamlit cache and temporary files -.streamlit/ -.history/ -.cache/ -*.stcache -.stcache/ - -# Logs and temp files -*.log -*.out -*.err - -# IDE and editor config files -.vscode/ -.idea/ -*.swp -*.swo -*.bak -*.tmp - -# System files -.DS_Store -Thumbs.db - -# OCR and image processing cache (if any) -~/.EasyOCR/ -*.easyocr -*.txt diff --git a/ai_agent_tutorials/ai_breakup_recovery_agent/README.md b/ai_agent_tutorials/ai_breakup_recovery_agent/README.md new file mode 100644 index 0000000..afc25c9 --- /dev/null +++ b/ai_agent_tutorials/ai_breakup_recovery_agent/README.md @@ -0,0 +1,115 @@ + +# 💔 Breakup Recovery Agent Team + +This is an AI-powered application designed to help users emotionally recover from breakups by providing support, guidance, and emotional outlet messages from a team of specialized AI agents. The app is built using **Streamlit** and **Agno**, leveraging **OpenAI's GPT models**. + +## 🚀 Features + +- 🧠 **Multi-Agent Team:** + - **Therapist Agent:** Offers empathetic support and coping strategies. + - **Closure Agent:** Writes emotional messages users shouldn't send for catharsis. + - **Routine Planner Agent:** Suggests daily routines for emotional recovery. + - **Brutal Honesty Agent:** Provides direct, no-nonsense feedback on the breakup. +- 📷 **Chat Screenshot Analysis:** (Planned) + - Upload screenshots for chat analysis. +- 🔑 **API Key Management:** + - Store and manage your OpenAI API keys securely via Streamlit's sidebar. +- ⚡ **Parallel Execution:** + - Agents process inputs in coordination mode for comprehensive results. +- ✅ **User-Friendly Interface:** + - Simple, intuitive UI with easy interaction and display of agent responses. + +--- + +## 🛠️ Tech Stack + +- **Frontend:** Streamlit (Python) +- **AI Models:** OpenAI GPT-4o (via Agno) +- **Image Processing:** PIL (for displaying screenshots) +- **Text Extraction:** EasyOCR (planned feature for extracting text from screenshots) +- **Environment Variables:** API keys managed with `st.session_state` in Streamlit + +--- + +## 📦 Installation + +1. **Clone the Repository:** + ```bash + git clone + cd breakup-recovery-agent-team + ``` + +2. **Create a Virtual Environment (Optional but Recommended):** + ```bash + conda create --name python= + conda activate + ``` + +3. **Install Dependencies:** + ```bash + pip install -r requirements.txt + ``` + +4. **Run the Streamlit App:** + ```bash + streamlit run app.py + ``` + +--- + +## 🔑 Environment Variables + +Make sure to provide your **OpenAI API key** in the Streamlit sidebar: + +- `OpenAI API Key` → Add your API key in the sidebar form. + +--- + +## 🛠️ Usage + +1. **Enter Your Feelings:** + - Describe how you're feeling in the text area. +2. **Upload Screenshot (Optional):** + - Upload a chat screenshot (PNG, JPG, JPEG) for analysis (planned feature). +3. **Execute Agents:** + - Click **"Get Recovery Support"** to run the multi-agent team. +4. **View Results:** + - Individual agent responses are displayed. + - A final summary is provided by the Team Leader. + +--- + +## 🧑‍💻 Agents Overview + +- **Therapist Agent** + - Provides empathetic support and coping strategies. + - Uses **OpenAI GPT-4o-mini** and DuckDuckGo tools for insights. + +- **Closure Agent** + - Generates unsent emotional messages for emotional release. + - Ensures heartfelt and authentic messages. + +- **Routine Planner Agent** + - Creates a daily recovery routine with balanced activities. + - Includes self-reflection, social interaction, and healthy distractions. + +- **Brutal Honesty Agent** + - Offers direct, objective feedback on the breakup. + - Uses factual language with no sugar-coating. + +--- + +## 🔥 Future Enhancements + +- ✅ **Text Extraction from Screenshots:** + - Use EasyOCR to extract text from uploaded screenshots for chat analysis. +- ✅ **Improved Image Analysis:** + - Integrate image analysis tools for detecting visual patterns in chat screenshots. + +--- + +## 📄 License + +This project is licensed under the **MIT License**. + +--- diff --git a/ai_agent_tutorials/ai_breakup_recovery_agent/app.py b/ai_agent_tutorials/ai_breakup_recovery_agent/app.py index 13d1c73..b11054b 100644 --- a/ai_agent_tutorials/ai_breakup_recovery_agent/app.py +++ b/ai_agent_tutorials/ai_breakup_recovery_agent/app.py @@ -20,7 +20,6 @@ if submit_button: # --- User Input --- user_input = st.text_area("Describe how you're feeling...") -print(user_input) # --- Image Upload --- uploaded_image = st.file_uploader("Upload a chat screenshot (optional)", type=["png", "jpg", "jpeg"]) @@ -46,7 +45,6 @@ if st.button("Get Recovery Support"): # Set environment variables import os os.environ["OPENAI_API_KEY"] = st.session_state.get("openai_api_key", "") - # os.environ["AGNO_API_KEY"] = st.session_state.get("agno_api_key", "") # Prepare the input input_data = user_input diff --git a/ai_agent_tutorials/ai_breakup_recovery_agent/requirements.txt b/ai_agent_tutorials/ai_breakup_recovery_agent/requirements.txt new file mode 100644 index 0000000..25c0952 --- /dev/null +++ b/ai_agent_tutorials/ai_breakup_recovery_agent/requirements.txt @@ -0,0 +1,3 @@ +agno==1.2.4 +pillow==11.1.0 +streamlit==1.44.0