Skip to content
Lobe is the world's first AI paralegal.
Python Other
  1. Python 98.7%
  2. Other 1.3%
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app FIX: better property based testing for lobe utils Jul 26, 2018
ml_container CHORE: adding better testing May 7, 2018
test FIX: better property based testing for lobe utils Jul 26, 2018
.coveralls
.gitignore CHORE: AUTO COMMIT: Tue May 29 13:00:08 2018 May 29, 2018
.travis.yml FIX: test directories and pip file caching in CI May 9, 2018
Dockerfile FEAT: dockerizing lobe May 17, 2018
Makefile
Procfile FIX: working refactor, proper structure, initial working smoke test May 8, 2018
README.md DOCS: quick fix to doc and runtime for python3.7 Jul 5, 2018
requirements.txt
runtime.txt DOCS: quick fix to doc and runtime for python3.7 Jul 5, 2018

README.md

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.

You can’t perform that action at this time.