An open source library for building end-to-end dialog systems and training chatbots.
Project description
DeepPavlov is an open-source conversational AI library built on PyTorch.
DeepPavlov is designed for
- development of production ready chat-bots and complex conversational systems,
- research in the area of NLP and, particularly, of dialog systems.
Quick Links
- Demo demo.deeppavlov.ai
- Documentation docs.deeppavlov.ai
- Model List docs:features/
- Contribution Guide docs:contribution_guide/
- Issues github/issues/
- Forum forum.deeppavlov.ai
- Blogs medium.com/deeppavlov
- Tutorials examples/ and extended colab tutorials
- Docker Hub hub.docker.com/u/deeppavlov/
- Docker Images Documentation docs:docker-images/
Please leave us your feedback on how we can improve the DeepPavlov framework.
Models
Named Entity Recognition | Intent/Sentence Classification |
Question Answering over Text (SQuAD) | Knowledge Base Question Answering
Sentence Similarity/Ranking | TF-IDF Ranking
Automatic Spelling Correction | Entity Linking
Skills
Open Domain Questions Answering
Frequently Asked Questions Answering
Embeddings
BERT embeddings for the Russian, Polish, Bulgarian, Czech, and informal English
ELMo embeddings for the Russian language
FastText embeddings for the Russian language
Auto ML
Integrations
Installation
-
We support
Linuxplatform,Python 3.6,3.7,3.8and3.9Python 3.5is not supported!
-
Create and activate a virtual environment:
Linux
python -m venv env source ./env/bin/activate -
Install the package inside the environment:
pip install deeppavlov
QuickStart
There is a bunch of great pre-trained NLP models in DeepPavlov. Each model is determined by its config file.
List of models is available on
the doc page in
the deeppavlov.configs (Python):
from deeppavlov import configs
When you're decided on the model (+ config file), there are two ways to train, evaluate and infer it:
- via Command line interface (CLI) and
- via Python.
GPU requirements
To run supported DeepPavlov models on GPU you should have CUDA compatible with used GPU and library PyTorch version.
Command line interface (CLI)
To get predictions from a model interactively through CLI, run
python -m deeppavlov interact <config_path> [-d]
-ddownloads required data -- pretrained model files and embeddings (optional).
You can train it in the same simple way:
python -m deeppavlov train <config_path> [-d]
Dataset will be downloaded regardless of whether there was -d flag or not.
To train on your own data you need to modify dataset reader path in the train config doc. The data format is specified in the corresponding model doc page.
There are even more actions you can perform with configs:
python -m deeppavlov <action> <config_path> [-d]
<action>can bedownloadto download model's data (same as-d),trainto train the model on the data specified in the config file,evaluateto calculate metrics on the same dataset,interactto interact via CLI,riseapito run a REST API server (see doc),predictto get prediction for samples from stdin or from <file_path> if-f <file_path>is specified.
<config_path>specifies path (or name) of model's config file-ddownloads required data
Python
To get predictions from a model interactively through Python, run
from deeppavlov import build_model
model = build_model(<config_path>, download=True)
# get predictions for 'input_text1', 'input_text2'
model(['input_text1', 'input_text2'])
- where
download=Truedownloads required data from web -- pretrained model files and embeddings (optional), <config_path>is path to the chosen model's config file (e.g."deeppavlov/configs/ner/ner_ontonotes_bert_mult.json") ordeeppavlov.configsattribute (e.g.deeppavlov.configs.ner.ner_ontonotes_bert_multwithout quotation marks).
You can train it in the same simple way:
from deeppavlov import train_model
model = train_model(<config_path>, download=True)
download=Truedownloads pretrained model, therefore the pretrained model will be, first, loaded and then train (optional).
Dataset will be downloaded regardless of whether there was -d flag or
not.
To train on your own data you need to modify dataset reader path in the train config doc. The data format is specified in the corresponding model doc page.
You can also calculate metrics on the dataset specified in your config file:
from deeppavlov import evaluate_model
model = evaluate_model(<config_path>, download=True)
License
DeepPavlov is Apache 2.0 - licensed.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file deeppavlov-1.0.0rc1.tar.gz.
File metadata
- Download URL: deeppavlov-1.0.0rc1.tar.gz
- Upload date:
- Size: 236.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
caaf8e65953103ce9795d94ab31c822a0f5146073f28eebf706a4ee4cae3f59b
|
|
| MD5 |
323174e1704f5119ab881e9cc318b434
|
|
| BLAKE2b-256 |
2ad6f79d08a4a66210712536223e123de939a97e135ccadc18bfa92d9bfbd3d3
|
File details
Details for the file deeppavlov-1.0.0rc1-py3-none-any.whl.
File metadata
- Download URL: deeppavlov-1.0.0rc1-py3-none-any.whl
- Upload date:
- Size: 440.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da0b2472ede00643048643ebfb560851e7472180df25d517f2c64e75812a3159
|
|
| MD5 |
ba16043a83c148ca8264724fe3abe466
|
|
| BLAKE2b-256 |
a087f9be268d7b9b26b6222ca4fbec7b10848a9996427caf35eb07c68e488436
|