Skip to content
Plateforme d'annotation du projet Piaf - pour une IA francophone
Python Vue HTML JavaScript CSS Shell Other
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.


Codacy Badge Build Status

Piaf is an open-source QA (question answering) annotation plateform.
It handles the following features :

  • nice UI (conceived by a designer)
  • contributor enrollment (signup & mail validation)
  • contributor certification (by any member of the admin team)
  • admin team administration (by the super-admin)
  • input/output of texts to be annotated using the SQuAD format
  • users scoring (for bot and troll removal)
  • annotations managment

1. Installation

First clone the repo:

git clone
cd piaf

Then create the environment variables (you can customise your API keys and passwords):

cp .env-example .env

Now you have tow options : install the app with Docker or without

Installing with Docker

As a prerequisite, you need to have installed Docker & Docker-compose on your computer.

Then, type:

docker-compose pull

Installing without

As a prerequisite, you need to have installed on your computer:

  • Python 3.6+
  • Django 2.1.7+
  • Node.js 8.0+
  • Chromium (recommended)

First install Python dependencies:

sudo apt-get install libpq-dev  # Linux/Debian only
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

Then compile the frontend:

make build-statics

When developing the frontend, you may prefer watching for files changes. Run npm start (instead of npm run build) for building and hot reloading.

2. Running

Running with Docker

make up

Have a look at the Makefile for more details

Running without

First prepare the database:

cd src
python migrate

Then create the admin user:

python create_admin --noinput --username "admin" --email "" --password "password"

And finally run the Django server:

python runserver

Note that Django permits to run the server on a different IP or port. python runserver <ip>:<port>

3. Creating a project

Open your web-browser at and login with the admin you created above (username: "admin", password: "password"):

You will then need to create a project on the admin panel:

Create a questions/answers type project. If you are interested in others kinds of projects you should visit doccano.

Running the tests

python test server.tests

Importing texts

Go to :

Only JSON file can be imported. They need to be exaclty following the SQuAD format.
Here is an example of input dataset: Click here to download


Simply reach : app/

Exporing results

Again, on the page : app/admin

Possible formats are CSV or JSON.

All documents have a metadata column which contain data about the imported document. These metadata are especially useful to match imported results with the original dataset. Example:


{"text": "EU rejects German call to boycott British lamb.", "external_id": 1}


{"doc_id": 16, "text": "EU rejects calls", "labels": ["news"], "username": "user23", "metadata": {"external_id": 1}}


Passing most settings as environment variable will override the default settings. Here are some of the variable customisable:

DJANGO_ALLOW_SIGNUP=True # Allow users to singup (for crowdsourcing)
DJANGO_USE_MAILJET=False # use Mailjet or the native Django mail service
DJANGO_MAILJET_API_KEY=ffdfsfcfs2a00ad5ef367bfdsflsdk # put your Mailjet API key here, this is an example resulting in Errors
DJANGO_MAILJET_SECRET_KEY=nhf41cc0d45ffsdfs6fdsfdsffdsfsf # put your Mailjet API secret here, this is an example resulting in Errors
MATOMO_SITE_ID= # Matomo id
WEBPACK_ENVIRONMENT_PRODUCTION=False # build the frontend  or run a 'npm run serve'

with Docker

Edit the .env file


Set the environment variable before launching your server

DEBUG=0 MATOMO_SITE_ID=77 src/ runserver

this Will disable debugging and activate Matomo tracking for instance


Feel free to submit any feedback.


PIAF plateform was originally inspired by Doccano. The PIAF team contributed to Doccano repository until the Doccano project was to far from PIAF needs.


2018 chakki.
2019 DINUM, Guillim.

This application is published under the MIT license.

You can’t perform that action at this time.