Coder Social home page Coder Social logo

yinghu-math / step-by-step-nlp-dialogpt-chatbot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fourthbrain/step-by-step-nlp-dialogpt-chatbot

0.0 0.0 0.0 473 KB

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

License: MIT License

Python 29.47% CSS 28.70% HTML 36.52% Dockerfile 5.31%

step-by-step-nlp-dialogpt-chatbot's Introduction

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.

step-by-step-nlp-dialogpt-chatbot's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.