Tutorial: Creating a simple chatbot with transformers: Difference between revisions
Jump to navigation
Jump to search
RobowaifuDev (talk | contribs) mNo edit summary |
RobowaifuDev (talk | contribs) mNo edit summary |
||
Line 1: | Line 1: | ||
{{Expand|This tutorial is not complete yet!}} | |||
This tutorial will show you how to create your own [[Conversational AI|chatbot]] in Python using Hugging Face's transformers library. | This tutorial will show you how to create your own [[Conversational AI|chatbot]] in Python using Hugging Face's transformers library. | ||
Latest revision as of 18:23, 3 May 2023
This tutorial will show you how to create your own chatbot in Python using Hugging Face's transformers library.
Getting started
First you'll need to install Python and PyTorch. In this tutorial I will be using Python 3.10.7 and PyTorch 1.12.1+cu116.
Once Python and PyTorch are installed, install Hugging Face's transformers library.
Via Conda:
conda install -c huggingface transformers
Via Pip:
python -m pip install transformers --user
Now you're all set to do NLP with transformers.
Hello, Anon!
from transformers import AutoTokenizer, OPTForCausalLM