Skip to content
master
Switch branches/tags
Code

JupyterLab extension for the Prodigy annotation tool

This repo contains a JupyterLab extension for Prodigy, our scriptable annotation tool for creating training data for machine learning models. It lets you run Prodigy within a JupyterLab tab, and annotate as you develop your models and applications. In order to use this extension, you'll need a license for Prodigy – see this page for more details. For questions, please use the Prodigy Support Forum. If you've found a bug, feel free to submit a pull request.

πŸ™ Special thanks to Jupyter core dev Grant Nestor for helping us build this extension!

npm

βŒ›οΈ Installation

To use this extension, you need JupyterLab >= 2.0.0 ⚠️ and Prodigy.

pip install jupyterlab>=2.0.0
jupyter labextension install jupyterlab-prodigy

πŸ“‹ Usage

Start a Prodigy session in a terminal, e.g.:

$ prodigy ner.manual my_set blank:en notebooks/news_headlines.jsonl --label PERSON,ORG,PRODUCT

In another terminal session, start JupyterLab:

$ jupyter lab

Then, inside of JupyterLab, open the Commands on the left sidebar, and search/type:

Open Prodigy

Execute it, you will have a new Prodigy panel on the side.

βš™ Configuration

If your Prodigy is being served at a URL different than the default (e.g. behind a reverse proxy) you can configure the URL to use in the settings.

Open the Settings menu, go to Advanced Settings Editor, select the settings for Prodigy Jupyter Extension, and there you can add your custom URL, e.g.:

{
    "prodigyConfig": {
        "url": "https://prodigy.example.com"
    }
}

πŸ‘©β€πŸ’» Develop

git clone https://github.com/explosion/jupyterlab-prodigy
cd jupyterlab-prodigy

# Install Javascript dependencies
npm install # or yarn

# Build JupyterLab extension
npm run build # or yarn build
jupyter labextension install .

To rebuild the JupyterLab extension:

npm run build # or yarn build
jupyter lab build

To rebuild the JupyterLab extension automatically as the source changes:

# In one terminal tab, watch the jupyterlab-prodigy directory
npm run watch # or yarn watch

# In another terminal tab, run jupyterlab with the watch flag
jupyter lab --watch