Skip to content

wsmontes/WawaChat-Mac

Repository files navigation

WawaChat

A lightweight desktop chat application powered by TinyLlama for local AI conversation.

WawaChat Screenshot

Features

  • Chat interface powered by TinyLlama LLM
  • Customizable generation parameters
  • Cross-platform desktop application
  • Runs locally for privacy

Installation

Prerequisites

  • Python 3.8 or higher
  • GPU recommended for faster inference (but CPU works too)

Setup

Option 1: Using the setup script (recommended)

  1. Clone the repository:
git clone https://github.com/yourusername/wawachat.git
cd wawachat
  1. Run the setup script:
# For macOS/Linux
chmod +x setup.sh
./setup.sh

# For Windows
./setup.sh
  1. Edit the .env file to add your Hugging Face token:
HUGGINGFACE_TOKEN=your_token_here
  1. Run the application:
python wawachat-v1.5.py

Option 2: Manual setup

  1. Clone the repository:
git clone https://github.com/yourusername/wawachat.git
cd wawachat
  1. Create and activate a virtual environment (optional but recommended):
# For macOS/Linux
python3 -m venv venv
source venv/bin/activate

# For Windows
python -m venv venv
venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Create a .env file with your Hugging Face token:
HUGGINGFACE_TOKEN=your_token_here
  1. Run the application:
python wawachat-v1.5.py

Usage

  1. Type your message in the input box and press Enter to send
  2. The AI will respond in the conversation window
  3. Adjust generation parameters in the side panel as needed
  4. Use the Clear button to reset the conversation

Configuration

Adjust the following parameters to customize the AI's responses:

  • Max new tokens: Maximum number of tokens to generate
  • Temperature: Controls randomness (higher = more random)
  • Top P: Controls diversity via nucleus sampling
  • Num Beams: Number of beams for beam search
  • Truncation: Whether to truncate input tokens
  • Do Sample: Whether to use sampling
  • Early Stopping: Whether to stop generation when all beams are finished

Troubleshooting

ModuleNotFoundError: No module named 'dotenv'

This error occurs when the python-dotenv package is not installed. Fix it by running:

pip install python-dotenv

Other missing dependencies

If you encounter other missing dependencies, make sure to install all requirements:

pip install -r requirements.txt

The model is loading very slowly

TinyLlama is a large language model. The first time you run the application, it will download the model which may take some time depending on your internet connection. Subsequent runs will be faster.

License

MIT

Acknowledgments

About

WawaChat is a lightweight chat application built with TinyLlama. It offers a simple, interactive interface, real-time status updates, and customizable generation parameters—all powered by Python, PyTorch, and Hugging Face Transformers.

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages