Emotica AI is a compassionate and therapeutic virtual assistant designed to provide empathetic and supportive conversations. It integrates a local LLaMA model for text generation, a vision model for image captioning, a RAG system for information retrieval, and emotion detection to tailor its responses.
- Local AI: Runs entirely on your local machine.
- Multi-modal: Understands both text and images.
- RAG (Retrieval-Augmented Generation): Can answer questions based on documents you provide.
- Emotion-Aware: Detects user emotions from images to provide more empathetic responses.
- Web Interface: Easy-to-use chat interface accessible from your browser.
- Memory: Remembers key information shared by the user for a personalized experience.
- Python: Version 3.10, 3.11, or 3.12.
- Git: For cloning the repository.
- C++ Compiler: Required for
llama-cpp-python.- Windows: Install Visual Studio with the "Desktop development with C++" workload.
- macOS: Install Xcode Command Line Tools (
xcode-select --install). - Linux: Install
build-essential(sudo apt-get install build-essential).
- CUDA Toolkit (Optional, for NVIDIA GPUs): For GPU acceleration. Make sure to install a version compatible with your driver and PyTorch.
git clone https://github.com/KienPC1234/Emotica-AI.git
cd Emotica-AIIt's highly recommended to use a virtual environment to manage dependencies.
-
Windows:
python -m venv venv .\venv\Scripts\activate
-
macOS / Linux:
python3 -m venv venv source venv/bin/activate
The application will attempt to install required packages automatically when you run it. However, you can also install them manually.
There are two requirements files:
requirements.txt: For CPU-based inference.requirements_cuda.txt: For NVIDIA GPU-based inference (includes CUDA-enabled PyTorch andllama-cpp-python).
For CPU:
pip install -r requirements.txtFor NVIDIA GPU (CUDA):
pip install -r requirements_cuda.txtNote: The automatic installer in main.py uses requirements.txt by default. You may need to edit main.py if you want it to use the CUDA requirements file.
-
Download your desired GGUF-format LLaMA models.
-
Place them in the
models/directory. -
Edit
models/cfg.jsonto configure your models. A sample file is created on first run if it doesn't exist. Make sure thepathfor each model is correct.{ "models": [ { "name": "Llama-3-8B-Instruct-Demo", "path": "models/Meta-Llama-3-8B-Instruct.Q4_K_M.gguf", "format": "llama-3", "description": "Model LLaMA 3 8B", "max_context": 8192, "temperature": 0.7, "top_p": 0.9 } ], "valid_formats": ["llama-3", "mistral-instruct", "chatml"] }
Simply run the main.py script from the project root directory.
python main.pyThe script will:
- Check if your Python version is compatible (3.10-3.12).
- Check for and install any missing dependencies from
requirements.txt. - Start the LLaMA API server and the Web server.
- Automatically open the web interface in your default browser.
The application will be available at http://localhost:8000 (or the port configured in ports.toml).
Press Ctrl+C in the terminal where main.py is running to gracefully shut down all server processes.