/Llama2ChatBot

Llama2 chat bot that runs locally

Primary LanguagePythonMIT LicenseMIT

Llama 2 ChatBot

This project is a chatbot built with Llama 2 that runs on your local machine, the web application is powerede by Streamlit.

You can try the Demo with CPU here:

Streamlit App

## Installation

Follow these steps to install and run the chatbot on your local machine:

1. Setting Up the Virtual Environment

  1. Open a terminal or command prompt.

  2. Create a virtual environment using Python's built-in venv module with the following command:

    • On macOS and Linux:
    python3 -m venv chatbot
    • On Windows:
    python -m venv chatbot

    This command creates a new directory named 'chatbot'. Feel free to choose a different name if you prefer.

  3. Create a new conda environment, install CLI app, and activate the environment.

    conda create -n mlc-chat-venv -c mlc-ai -c conda-forge mlc-chat-cli-nightly
    conda activate mlc-chat-venv
  4. Activate the virtual environment with the following command:

    • On macOS and Linux:

      source chatbot/bin/activate
    • On Windows:

      .\chatbot\Scripts\activate

    You will know the virtual environment is activated when its name appears in your command prompt.

2. Install the Necessary Packages

Once the virtual environment is activated, install the necessary packages with the following command:

pip install -r requirements.txt

3. Run the App

After all the packages have been installed, you can run the app with the following command:

streamlit run app.py

Enjoy interacting with the Llama 2 ChatBot!

Resource