Solace is an AI-powered chatbot designed to provide users with personalized and engaging conversations. Using a combination of advanced NLP models like Google's Gemini, emotion analysis tools (NRCLex), and speech recognition, Solace offers a seamless conversational experience with context-aware and emotion-sensitive responses. It supports both text and voice-based interactions and is fully dockerized and deployable for scalability and reliability.
- Contextual Conversations: Powered by Google Gemini for intelligent response generation.
- Emotion-Aware: Detects emotions through NRCLex and adapts responses accordingly.
- Voice Interaction: Supports Speech-to-Text and Speech Recognition for voice-based interactions.
- Cloud Deployment: Dockerized and hosted on AWS for scalability and performance.
- Easy Setup: Quick setup using Docker, Python dependencies, and environment variables.
Before running the project, make sure you have:
- Docker installed and running.
- Python 3.10 installed.
Follow the steps below to set up Solace on your local machine:
git clone https://github.com/dipayandas24/Solace
cd Solace python3 -m venv venv
source venv/bin/activate python -m venv venv
venv\Scripts\activate pip install -r requirements.txt streamlit run Home.py Visit http://localhost:8501 to interact with the chatbot.
If you want to run the application using Docker, follow the steps below:
git clone https://github.com/dipayandas24/Solace
cd Solace docker-compose build --no-cachedocker-compose up --buildThe app will be available at http://localhost:8501.
NRCLex and TextBlob require several NLTK corpora. These are automatically downloaded at runtime, but if you encounter errors, ensure your entry files include:
import nltk
nltk.download('punkt', quiet=True)
nltk.download('averaged_perceptron_tagger', quiet=True)
nltk.download('brown', quiet=True)
nltk.download('wordnet', quiet=True)-
Streamlit & HTML/CSS: Provides a fast and interactive web UI for chatbot interactions. Custom HTML/CSS ensures a polished user experience.
-
Google Gemini (Generative AI): Utilized for powerful NLP tasks like response generation and understanding. Configure GEMINI_API_KEY in your environment and use the
google-generativeaiPython client. -
NRCLex: Detects emotions from user input to enable personalized, emotion-sensitive responses from the chatbot.
-
Speech-to-Text & Speech Recognition: Allows users to interact with the chatbot using voice commands, making it more accessible and engaging.
-
Google Gemini Model: A highly capable generative model for natural language processing, enabling context-aware, dynamic conversations with users.
-
PostgreSQL & SQLAlchemy: Used for structured storage of user data and conversation history, ensuring quick retrieval and consistency.
-
Docker: Docker ensures easy deployment and scalability.
We welcome contributions to Solace! Here’s how you can contribute:
-
Fork the repository and clone it locally.
-
Create a new branch for your feature or bugfix:
bash git checkout -b feature/your-feature-name
-
Write tests for any new functionality or fixes.
-
Ensure code follows PEP 8 guidelines. Use black for code formatting and flake8 for linting.
-
Commit changes with descriptive messages:
bash git commit -m "feat: add new feature"
-
Push changes to your fork:
bash git push origin feature/your-feature-name
-
Open a Pull Request to the main repository.
-
Review process: Once your PR is reviewed, be ready to make necessary changes and improvements based on feedback.