Skip to content

Deploy the DialoGPT chatbot to your local machine or to the cloud using Flask and Docker

License

Notifications You must be signed in to change notification settings

FourthBrain/step-by-step-nlp-dialogpt-chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Thus begins the chronicles of Dooracle; a fledgling digital product startup set to revolutionize the fortune telling industry.

Their moonshot?

To build a fortune-telling chatbot.

The project is aimed at filling the demand for people who want their futures predicted.

When the superintelligent AI is finally ready for transfer learning, their product will be there.

A bulletproof plan.

Step by Step NLP: Data to Deployment

A workshop on how to build and deploy a virtual chatbot using Natural Language Processing. You can check out the slide here

📹👇 Design_YT_DLAIEventBrite

After the event, we heard your feedback! Greg created a step by step walkthrough, complete with stumbles and rewinds, that takes about 75 minutes to see everything about what happens behind the scenes. FullRunThrough (Time 0_10_41;01)_small

How To Use These Videos

The following videos were part of original workshop, and will help you to deploy the DialoGPT-medium chatbot to your local machine or to the cloud.

Prerequisites

These videos were shot on a Windows machine running Ubuntu on WSL2 through Windows Terminal. Google Cloud Platform was used to deploy the chatbot remotely. Docker Desktop was also leveraged along with Notepadd++

Part 1: Get Chatbot Running on Virtual Machine in Jupyter Notebook

GetGPTRunning (Time 0_00_20;05)

Install packages in WSL2 Ubuntu Root

sudo apt update
sudo apt install python3-pip python3-dev
sudo -H pip3 install --upgrade pip
sudo -H pip3 install virtualenv

Allocate folders and create vm

mkdir ~/chatbot-event
cd chatbot-event
virtualenv chattyvm
source chattyvm/bin/activate

Install libraries

pip install jupyter
pip install torch
pip install transformers

Then just run DialoGPT in Jupyter!

Part 2: Open-Source Chatbot UI and DialoGPT Intelligence Upgrade

GothamChatbotRunning (Time 0_03_43;22)

Install git and clone this repo!

sudo apt install git
git clone https://github.com/FourthBrain/step-by-step-nlp-dialogpt-chatbot.git

Run it!

cd step-by-step-nlp-dialogpt-chatbot/dialogpt-chatbot
flask run

Part 3: Dockerizing DialoGPT Chatbot

DialoGPTRunningOnDocker (Time 0_02_11;12)

Install git and clone this repo!

sudo apt install git
git clone https://github.com/FourthBrain/step-by-step-nlp-dialogpt-chatbot.git

Run it!

cd ..
cd dialogpt-chatbot-dockerize
docker build -t dialogpt-chatbot-image
docker run -d -p 8080:8080 dialogpt-chatbot-image

Part 4: Deploying DialoGPT in the Cloud

DialoGPTRunningOnGCP (Time 0_03_29;04)

Create account, setup billing, open terminal, upload files

cd dialogpt-chatbot-dockerize
gcloud builds submit --tag gcr.io/my-project/dialogpt-chatbot-image
gcloud run deploy --image gcr.io/my-project/dialogpt-chatbot-image --memory 4Gi

Shoutouts

Big ups to Hugging Face for their awesome repo of models and streamlining all things SOTA ML modeling; you can check out DialoGPT-medium here

Thanks to bhargavramdr for the right chatbot UI at the right time. Happy Halloween 2021!

License

All source from FourthBrain is free to use, but microsoft/DialoGPT is licensed under the MIT License.

About

Deploy the DialoGPT chatbot to your local machine or to the cloud using Flask and Docker

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published