Giter Club home page Giter Club logo

digitalgeniuschallenge's Introduction

Digital Genius Python Challenge

Dependencies

Dependency
pytest
flask
nltk
numpy

Getting started

Build the docker image

$ cd app ;
$ docker build -t chat_bot .

Run the docker image

$ docker run -d -p 5000:5000 chat_bot

Now you can access the application via the URL http://localhost:5000

Usage

All of the following are examples of the body of the following HTTP 1.1 request:

POST http://localhost:5000/help with the header : Content-type : application/json

Body Format

{
    "id" : "model_id",
    "request" : "help_request"
}

The available models are:

* 26444047-56f8-43e5-8e25-b70b8e5367f1
* f59da1c7-c060-4aec-b3a0-dd7453a4c541

Response format

The response comes in JSON, with the following format

{ "response": "response from model" }

Example

Request

curl: POST http://localhost:5000/help
header : Content-type : application/json
body : 
    {
    "id": "26444047-56f8-43e5-8e25-b70b8e5367f1",
    "request": "Hello my name is Siri, can you help me?"
    }

Response

    {
    "response": "Thanks for getting in touch Siri! I will try my best to help"
    }

Known Problems

The Model used to find the names in a string of text has some problems with the following request format: "Hi here, can you give me a hand?", sometimes the model will not be able to find the name, for example, if == 'Siri' no name is found but if == 'Seydou Abioye' or == 'John' it will.

Persisting the models

Both models are persisted in a pickle that contains a hash table that maps model_id to the model instance, this pickle is used to simulate an access to a database.

Author

Francisco Aguiar : [email protected]

digitalgeniuschallenge's People

Watchers

James Cloos avatar Conan avatar Sam Coope avatar Maegner 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.