Ujeshhh commited on
Commit
5349e44
·
verified ·
1 Parent(s): 06ee13a

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +76 -12
README.md CHANGED
@@ -1,12 +1,76 @@
1
- ---
2
- title: MHChatbot
3
- emoji: 💻
4
- colorFrom: pink
5
- colorTo: red
6
- sdk: gradio
7
- sdk_version: 5.25.1
8
- app_file: app.py
9
- pinned: false
10
- ---
11
-
12
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Healora: Your Safe Space for Healing and Hope
2
+
3
+ ## Overview
4
+ Healora is a mental health support chatbot designed to provide empathetic, region-specific assistance. Built with Python using the Gradio framework, it integrates the Google Gemini AI (`learnlm-1.5-pro-experimental`) for conversations, Gmail API for appointment scheduling, and Plotly/Pandas for mood tracking. It offers coping strategies, emergency resources, therapist appointments, and conversation history management tailored to users' needs.
5
+
6
+ ## Features
7
+ - **Conversational Support**: AI-driven responses with adjustable tones (Neutral, Calm, Motivational) and language detection.
8
+ - **Mood Tracking**: Log moods and visualize trends with interactive plots.
9
+ - **Coping Strategies**: Personalized advice based on selected mood (Happy, Sad, Anxious, Stressed, Other).
10
+ - **Regional Resources**: Displays emergency helplines for USA, India, UK, and Global regions.
11
+ - **Appointment Scheduling**: Book appointments with therapists and receive email notifications.
12
+ - **Emergency Meeting**: Request urgent Google Meet sessions with therapists.
13
+ - **Conversation History**: Archive and reload past conversations.
14
+
15
+ ## Prerequisites
16
+ - Python 3.7 or higher
17
+ - Required dependencies: `gradio`, `google-generativeai`, `plotly`, `pandas`, `langdetect`, `google-auth-oauthlib`, `google-auth-httplib2`, `google-api-python-client`
18
+ - Environment variables: `GEMINI_API_KEY`, `GMAIL_ADDRESS`, `GMAIL_TOKEN_JSON`
19
+
20
+ ## Installation
21
+ 1. Clone the repository or save the code as `healora_chatbot.py`.
22
+ 2. Install dependencies:
23
+ ```bash
24
+ pip install gradio google-generativeai plotly pandas langdetect google-auth-oauthlib google-auth-httplib2 google-api-python-client
25
+ ```
26
+ 3. Set up environment variables in a `.env` file or system environment:
27
+ ```
28
+ GEMINI_API_KEY=your_gemini_api_key
29
+ GMAIL_ADDRESS=your_gmail_address
30
+ GMAIL_TOKEN_JSON=your_generated_token
31
+ ```
32
+ - Obtain `GEMINI_API_KEY` from Google AI Studio.
33
+ - Generate `GMAIL_TOKEN_JSON` via Google Cloud Console with Gmail API enabled.
34
+ 4. Run the application:
35
+ ```bash
36
+ python healora_chatbot.py
37
+ ```
38
+ - Access the interface at `http://127.0.0.1:7860`.
39
+
40
+ ## Usage
41
+ ### Interface
42
+ - **Header**: Displays the title and welcome message.
43
+ - **Controls**: Dropdowns for mood, conversation style, region, and a text box for input.
44
+ - **Chat Area**: Shows bot responses (left) and user messages (right).
45
+ - **Buttons**: "Send", "Clear Chat", "New Conversation", "Emergency Resources".
46
+ - **Accordions**: "Mood Journal", "Schedule Appointment", "Request Emergency Meeting".
47
+
48
+ ### Workflow
49
+ 1. Select a region (e.g., "USA") and mood (e.g., "Sad").
50
+ 2. Type a message (e.g., "I feel overwhelmed") and click "Send" for a response with coping tips and resources.
51
+ 3. Log moods or view trends in the "Mood Journal".
52
+ 4. Click "Emergency Resources" for region-specific helplines.
53
+ 5. Schedule an appointment by selecting a therapist, time, date, and email.
54
+ 6. Request an emergency meeting with details and confirm to send an alert.
55
+ 7. Use "New Conversation" to archive and start fresh, or load past chats from the dropdown.
56
+
57
+ ## Configuration
58
+ - **Gemini Model**: Uses `learnlm-1.5-pro-experimental` with `temperature=0.7` and `max_output_tokens=200`.
59
+ - **Therapists**: Predefined list with specialties and time slots (e.g., Dr. Jane Smith for Anxiety and Depression).
60
+ - **Email**: Notifications sent from `GMAIL_ADDRESS` to therapist and user emails.
61
+
62
+ ## Future Improvements
63
+ - Add multilingual support.
64
+ - Integrate real-time therapist availability.
65
+ - Enhance UI with themes or animations.
66
+ - Implement user authentication.
67
+ - Add voice interaction.
68
+
69
+ ## License
70
+ For educational purposes.
71
+
72
+ ## Contributing
73
+ Feel free to submit issues or pull requests on the repository (if hosted). Contributions to improve features or fix bugs are welcome!
74
+
75
+ ## Contact
76
+ For support, reach out via the project repository or email (if applicable).