A simple chatbot using an LLM from Hugging Face, built as part of IBMβs AI Developer certification.
This project is a simple command-line chatbot built using the Facebook BlenderBot 400M distilled model, powered by Hugging Face's transformers library.
- Python 3.x
- Hugging Face Transformers
- IBM Cloud
- Skills Network
- π Text-based conversational interface
- π€ Hugging Face transformer models
- π§ AI-driven responses powered by LLMs
- β Based on an IBM lab project
- Uses the
facebook/blenderbot-400M-distillconversational model.
- Clone this repo:
git clone https://github.com/EberronBruce/ibm_simple_llm_chatbot_huggingface.git
cd ibm_simple_llm_chatbot_huggingfaceBefore running the chatbot, follow these steps to set up a Python virtual environment and install dependencies:
pip3 install virtualenvvirtualenv my_env # Create a virtual environment named my_env
source my_env/bin/activate # Activate the environment (use my_env\Scripts\activate on Windows)python3 -m pip install transformers==4.30.2 torchpython3 chatbot.py(Replace chatbot.py with the actual name of your script file if different.)
The bot will start an interactive loop in the terminal. You can chat with it by typing messages after the > prompt.
To stop the conversation, use Ctrl+C.
- transformers==4.30.2
- torch
This project is provided for educational purposes and uses models under the terms of the Facebook BlenderBot model license.