GithubHelp home page GithubHelp logo

timnon / product-classifier Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ricardo-ch/di-interview-product-classifier

0.0 0.0 0.0 2.29 MB

Product classifier: build a text model and use it in a REST API

Jupyter Notebook 99.39% Python 0.46% HTML 0.15%

product-classifier's Introduction

DI Interview: Product classifier

This repository hosts all the necessary elements to complete the following DI exercise:

  1. Create a text model to classify products based on their title
  2. Use this model in a REST API, developed in Python

1 - Train the model

Use the Jupyter Notebook training/training.ipynb. The training set is located in BigQuery. You'll find the necessary starting code to be able to retrieve it in the notebook.

The referenced credentials.json file will be provided by email by our team and should be put in the training folder

Goal: train a model based on the titles and subtitles in the set to match a product type.

2 - Build the classifier API

Once the model trained, use the app folder to write the code for the REST API using this model.

The API should meet the following contract:

curl -XPOST 'http://localhost:5000/classify' \
-H 'Content-Type: application/json' \
-d '{ "title": "my product title containing aquarelle" }'

and the response should look like this:

{
    "title": "my product title containing aquarelle",
    "top_3_results": [
        {
            "product_type": "painting",
            "score": 0.xxxx
        },
        {
            "product_type": "aquarium",
            "score": 0.xxxx
        },
        {
            "product_type": "diving_suit",
            "score": 0.xxxx
        }
    ],
    "product_type": "painting"
}

No library is imposed to write the API, choose the one you want.

An issue, a question?

Send us a mail at [email protected]

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.