Git Product home page Git Product logo

deepqa2's Introduction

Approaching a Chatbot Service

Part 1: Introduction

Part 2: Bot Engine

Part 3: Bot Model

This repository is align with Part 3: Bot Model.

DeepQA2

Join the chat at https://gitter.im/chatbot-pilots/DeepQA

Train and serve QA Model with TensorFlow

Tested with TensorFlow#0.11.0rc2, Python#3.5.

Install Nvidia Drivers, CUDNn, Python, TensorFlow on Ubuntu 16.04

DeepQA

Inspired and inherited from DeepQA.

Install deps

pip install -r requirements.txt

Pre-process data

Process data, build vocabulary, word embedding, conversations, etc.

cp config.sample.ini config.ini
python deepqa2/dataset/preprocesser.py

Sample Corpus http://www.cs.cornell.edu/~cristian/Cornell_Movie-Dialogs_Corpus.html

Train Model

Train language model with Seq2seq.

cp config.sample.ini config.ini # modify keys
python deepqa2/train.py

Serve Model

Provide RESt API to access language model.

cd DeepQA2/save/deeplearning.cobra.vulcan.20170127.175256/deepqa2/serve
cp db.sample.sqlite3 db.sqlite3 
python manage.py runserver 0.0.0.0:8000

Access Service with RESt API

POST /api/v1/question HTTP/1.1
Host: 127.0.0.1:8000
Content-Type: application/json
Authorization: Basic YWRtaW46cGFzc3dvcmQxMjM=
Cache-Control: no-cache

{"message": "good to know"}

response
{
  "rc": 0,
  "msg": "hello"
}

deepqa2's People

Contributors

hailiang-wang avatar

Watchers

James Cloos avatar  avatar

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.