ZenBot is a simple chatbot application built using Flask and Python. It offers a relaxing and motivational experience by playing sounds, providing break suggestions, and sharing motivational quotes.
- Play Sounds: Users can play relaxing sounds like rain or forest ambiance.
- Motivational Quotes: Get inspired with random motivational quotes.
- Break Suggestions: Suggestions for short breaks to help you relax.
Ensure you have the following installed:
- Python 3.7 or higher
- Virtual Environment (optional but recommended)
-
Clone the repository:
git clone https://github.com/Coder-093/zenbot.git cd zenbot -
Set up a virtual environment: (This is for Windows)
python -m venv venv .\venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Add sound files:
- Ensure the following
.wavfiles are present in thesounds/directory:rain.wavforest.wav
- Ensure the following
-
Run the application:
python zenbot.py
-
Open your browser and navigate to:
http://127.0.0.1:5000/
- Open the chatbot in your browser.
- Type a command or click a suggestion button:
- Play Sounds:
play rainorplay forest - Take a Break:
take a break - Motivate Me:
motivate me
- Play Sounds:
- The chatbot responds with actions or messages based on your input.
zenbot/
├── zenbot.py # Main Flask application
├── sounds/ # Directory for sound files
│ ├── rain.wav
│ ├── forest.wav
├── templates/ # HTML templates
│ └── index.html
├── tests/ # Test scripts
│ └── test_play_sound.py
├── requirements.txt # Project dependencies
└── README.md # Project documentation
The tests/ folder contains scripts for testing the project:
test_play_sound.py: Verifies the functionality of sound playback usingsimpleaudio.
Run the test script:
python tests/test_play_sound.py- Add more relaxing sounds.
- Integrate a database to save user preferences.
- Improve the frontend with modern frameworks like React or Vue.
- Deploy the chatbot to a live server using Heroku or Render.
This project is licensed under the MIT License. See the LICENSE file for more details.
- Flask - Micro web framework for Python.
- simpleaudio - Library for audio playback.