From the course: Hands-On AI: Building Your First Conversational AI Chatbot

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Installing and importing required libraries

Installing and importing required libraries

- [Narrator] Now that we've set up Google Colab, let's install the libraries we'll use to build our chatbot. In the very first code cell, we see the following command, pip install transformers torch gradio datasets. Then we hit the Run button right here, or simply press Shift and Enter to execute the cell. This command will install four essential libraries, transformers, torch, which is short for PyTorch, gradio, and datasets. Let me briefly explain what each of these libraries does, starting with datasets. This is a powerful and easy-to-use library developed by Hugging Face that gives you access to thousands of ready-to-use datasets for natural language processing and machine-learning projects. Instead of manually downloading and processing data, you can load datasets like DailyDialog, PersonaChat, or Empathetic Dialogues with just a few lines of code. The Datasets library also handles tokenization and batching for you. Next we have Gradio. Gradio is an open source Python library…

Contents