Skip to content
/ lobe Public

Lobe is the world's first AI paralegal.

Notifications You must be signed in to change notification settings

davidawad/lobe

Repository files navigation

lobe

Build Status Coverage Status Maintainability

To provide for the common defense, and promote the general welfare.

lobe is powered by a few different things.

Getting Started

messenger platform

Set up messenger.py on heroku or some other platform. Make sure that facebook has subscribed your page to messenger events

rasa.ai

lobe uses rasa.ai. you can host the model on any given machine this way

on the ml endpoint
bash -c "docker run -p5000:5000 \
-v `pwd`/container_data/data:/app/data \
-v `pwd`/container_data/logs:/app/logs \
-v `pwd`/container_data/proj:/app/projects rasa/rasa_nlu:latest-full"
on any other machine

Make sure to make a request to the right hosts and the right model.

We'll start by making sure that the docker image is actually up and that it works. Here's an example from my machine

$ curl 'http://localhost:5000/status'
{
  "available_projects": {
    "lobe": {
      "status": "ready",
      "available_models": [
        "model_20180302-192533",
        "model_20180302-170041"
      ]
    },
    "expressions.json": {
      "status": "ready",
      "available_models": [
        "fallback"
      ]
    }
  }
}

First pass the model to train it and give the project a name

cat expressions.json | \
curl --request POST --header 'content-type: application/json' -d@- --url 'localhost:5000/train?project=lobe'
# wait for a bit
{
  "info": "new model trained: model_20180302-192533"
}

It will take a while for the model to be trained so just wait on it.

Then make requests using the name of the model you just created and the name of the project that will use that new model

curl -X POST localhost:5000/parse \
  -d '{"q":"what is court like?", "model":"model_20180302-170041", "project":"lobe"}'

Testing

All test cases are contained inside the test folder.

Style guide

This project generally follows the Google Python Style Guide

A labor of lobe by david awad.

Releases

No releases published

Packages

No packages published

Languages