A simple Python chatbot using the Llama 3.1 8B Instruct model from Hugging Face.
-
Clone the repo git clone https://github.com/varun-katara/HuggingFace-Chatbot.git cd HuggingFace-Chatbot
-
Create a virtual environment python -m venv venv venv\Scripts\activate # Windows source venv/bin/activate # Mac/Linux
-
Install dependencies pip install -r requirements.txt Add your Hugging Face API token Create a file called .env in the project folder:
-
Add your Hugging Face API token HUGGINGFACEHUB_API_TOKEN=hf_xxxxxxxxxxxxx
-
Run the chatbot python main.py