# DeepPavlov 1.0
[![License Apache 2.0](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/deeppavlov/DeepPavlov/blob/master/LICENSE)
![Python 3.6, 3.7, 3.8, 3.9, 3.10, 3.11](https://img.shields.io/badge/python-3.6%20%7C%203.7%20%7C%203.8%20%7C%203.9%20%7C%203.10%20%7C%203.11-green.svg)
[![Downloads](https://pepy.tech/badge/deeppavlov)](https://pepy.tech/project/deeppavlov)
[![Static Badge](https://img.shields.io/badge/DeepPavlov%20Community-blue)](https://forum.deeppavlov.ai/)
[![Static Badge](https://img.shields.io/badge/DeepPavlov%20Demo-blue)](https://demo.deeppavlov.ai/)
DeepPavlov 1.0 is an open-source NLP framework built on [PyTorch](https://pytorch.org/) and [transformers](https://github.com/huggingface/transformers). DeepPavlov 1.0 is created for modular and configuration-driven development of state-of-the-art NLP models and supports a wide range of NLP model applications. DeepPavlov 1.0 is designed for practitioners with limited knowledge of NLP/ML.
## Quick Links
|name|Description|
|--|--|
| ⭐️ [*Demo*](https://demo.deeppavlov.ai/)|Check out our NLP models in the online demo|
| 📚 [*Documentation*](http://docs.deeppavlov.ai/)|How to use DeepPavlov 1.0 and its features|
| 🚀 [*Model List*](http://docs.deeppavlov.ai/en/master/features/overview.html)|Find the NLP model you need in the list of available models|
| 🪐 [*Contribution Guide*](http://docs.deeppavlov.ai/en/master/devguides/contribution_guide.html)|Please read the contribution guidelines before making a contribution|
| 🎛 [*Issues*](https://github.com/deeppavlov/DeepPavlov/issues)|If you have an issue with DeepPavlov, please let us know|
| ⏩ [*Forum*](https://forum.deeppavlov.ai/)|Please let us know if you have a problem with DeepPavlov|
| 📦 [*Blogs*](https://medium.com/deeppavlov)|Read about our current development|
| 🦙 [Extended colab tutorials](https://github.com/deeppavlov/dp_tutorials)|Check out the code tutorials for our models|
| 🌌 [*Docker Hub*](https://hub.docker.com/u/deeppavlov/)|Check out the Docker images for rapid deployment|
| 👩🏫 [*Feedback*](https://forms.gle/i64fowQmiVhMMC7f9)|Please leave us your feedback to make DeepPavlov better|
## Installation
0. DeepPavlov supports `Linux`, `Windows 10+` (through WSL/WSL2), `MacOS` (Big Sur+) platforms, `Python 3.6`, `3.7`, `3.8`, `3.9` and `3.10`.
Depending on the model used, you may need from 4 to 16 GB RAM.
1. Create and activate a virtual environment:
* `Linux`
```
python -m venv env
source ./env/bin/activate
```
2. 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](http://docs.deeppavlov.ai/en/master/features/overview.html) in
the `deeppavlov.configs` (Python):
```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)](https://github.com/deeppavlov/DeepPavlov/blob/master/#command-line-interface-cli) and
* via [Python](https://github.com/deeppavlov/DeepPavlov/blob/master/#python).
#### GPU requirements
By default, DeepPavlov installs models requirements from PyPI. PyTorch from PyPI could not support your device CUDA
capability. To run supported DeepPavlov models on GPU you should have [CUDA](https://developer.nvidia.com/cuda-toolkit)
compatible with used GPU and [PyTorch version](https://github.com/deeppavlov/DeepPavlov/blob/master/deeppavlov/requirements/pytorch.txt) required by DeepPavlov models.
See [docs](https://docs.deeppavlov.ai/en/master/intro/quick_start.html#using-gpu) for details.
GPU with Pascal or newer architecture and 4+ GB VRAM is recommended.
### Command line interface (CLI)
To get predictions from a model interactively through CLI, run
```bash
python -m deeppavlov interact <config_path> [-d] [-i]
```
* `-d` downloads required data - pretrained model files and embeddings (optional).
* `-i` installs model requirements (optional).
You can train it in the same simple way:
```bash
python -m deeppavlov train <config_path> [-d] [-i]
```
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](http://docs.deeppavlov.ai/en/master/intro/config_description.html#train-config).
The data format is specified in the corresponding model doc page.
There are even more actions you can perform with configs:
```bash
python -m deeppavlov <action> <config_path> [-d] [-i]
```
* `<action>` can be
* `install` to install model requirements (same as `-i`),
* `download` to download model's data (same as `-d`),
* `train` to train the model on the data specified in the config file,
* `evaluate` to calculate metrics on the same dataset,
* `interact` to interact via CLI,
* `riseapi` to run a REST API server (see
[doc](http://docs.deeppavlov.ai/en/master/integrations/rest_api.html)),
* `predict` to 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
* `-d` downloads required data
* `-i` installs model requirements
### Python
To get predictions from a model interactively through Python, run
```python
from deeppavlov import build_model
model = build_model(<config_path>, install=True, download=True)
# get predictions for 'input_text1', 'input_text2'
model(['input_text1', 'input_text2'])
```
where
* `install=True` installs model requirements (optional),
* `download=True` downloads required data from web - pretrained model files and embeddings (optional),
* `<config_path>` is model name (e.g. `'ner_ontonotes_bert_mult'`), path to the chosen model's config file (e.g.
`"deeppavlov/configs/ner/ner_ontonotes_bert_mult.json"`), or `deeppavlov.configs` attribute (e.g.
`deeppavlov.configs.ner.ner_ontonotes_bert_mult` without quotation marks).
You can train it in the same simple way:
```python
from deeppavlov import train_model
model = train_model(<config_path>, install=True, download=True)
```
To train on your own data you need to modify dataset reader path in the
[train config doc](http://docs.deeppavlov.ai/en/master/intro/config_description.html#train-config).
The data format is specified in the corresponding model doc page.
You can also calculate metrics on the dataset specified in your config file:
```python
from deeppavlov import evaluate_model
model = evaluate_model(<config_path>, install=True, download=True)
```
DeepPavlov also [allows](https://docs.deeppavlov.ai/en/master/intro/python.html) to build a model from components for
inference using Python.
## License
DeepPavlov is Apache 2.0 - licensed.
Raw data
{
"_id": null,
"home_page": "https://github.com/deeppavlov/DeepPavlov",
"name": "deeppavlov",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "NLP, NER, SQUAD, Intents, Chatbot",
"author": "Neural Networks and Deep Learning lab, MIPT",
"author_email": "info@deeppavlov.ai",
"download_url": "https://files.pythonhosted.org/packages/fc/97/f62e1ca402f5dcd41fe594e72a5e1410d35d2b710bf2e92d6a8980f59a8d/deeppavlov-1.7.0.tar.gz",
"platform": null,
"description": "# DeepPavlov 1.0\n\n[![License Apache 2.0](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/deeppavlov/DeepPavlov/blob/master/LICENSE)\n![Python 3.6, 3.7, 3.8, 3.9, 3.10, 3.11](https://img.shields.io/badge/python-3.6%20%7C%203.7%20%7C%203.8%20%7C%203.9%20%7C%203.10%20%7C%203.11-green.svg)\n[![Downloads](https://pepy.tech/badge/deeppavlov)](https://pepy.tech/project/deeppavlov)\n[![Static Badge](https://img.shields.io/badge/DeepPavlov%20Community-blue)](https://forum.deeppavlov.ai/)\n[![Static Badge](https://img.shields.io/badge/DeepPavlov%20Demo-blue)](https://demo.deeppavlov.ai/)\n\n\nDeepPavlov 1.0 is an open-source NLP framework built on [PyTorch](https://pytorch.org/) and [transformers](https://github.com/huggingface/transformers). DeepPavlov 1.0 is created for modular and configuration-driven development of state-of-the-art NLP models and supports a wide range of NLP model applications. DeepPavlov 1.0 is designed for practitioners with limited knowledge of NLP/ML.\n\n## Quick Links\n\n|name|Description|\n|--|--|\n| \u2b50\ufe0f [*Demo*](https://demo.deeppavlov.ai/)|Check out our NLP models in the online demo|\n| \ud83d\udcda [*Documentation*](http://docs.deeppavlov.ai/)|How to use DeepPavlov 1.0 and its features|\n| \ud83d\ude80 [*Model List*](http://docs.deeppavlov.ai/en/master/features/overview.html)|Find the NLP model you need in the list of available models|\n| \ud83e\ude90 [*Contribution Guide*](http://docs.deeppavlov.ai/en/master/devguides/contribution_guide.html)|Please read the contribution guidelines before making a contribution|\n| \ud83c\udf9b [*Issues*](https://github.com/deeppavlov/DeepPavlov/issues)|If you have an issue with DeepPavlov, please let us know|\n| \u23e9 [*Forum*](https://forum.deeppavlov.ai/)|Please let us know if you have a problem with DeepPavlov|\n| \ud83d\udce6 [*Blogs*](https://medium.com/deeppavlov)|Read about our current development|\n| \ud83e\udd99 [Extended colab tutorials](https://github.com/deeppavlov/dp_tutorials)|Check out the code tutorials for our models|\n| \ud83c\udf0c [*Docker Hub*](https://hub.docker.com/u/deeppavlov/)|Check out the Docker images for rapid deployment|\n| \ud83d\udc69\u200d\ud83c\udfeb [*Feedback*](https://forms.gle/i64fowQmiVhMMC7f9)|Please leave us your feedback to make DeepPavlov better|\n\n\n## Installation\n\n0. DeepPavlov supports `Linux`, `Windows 10+` (through WSL/WSL2), `MacOS` (Big Sur+) platforms, `Python 3.6`, `3.7`, `3.8`, `3.9` and `3.10`.\n Depending on the model used, you may need from 4 to 16 GB RAM.\n\n1. Create and activate a virtual environment:\n * `Linux`\n\n ```\n python -m venv env\n source ./env/bin/activate\n ```\n\n2. Install the package inside the environment:\n\n ```\n pip install deeppavlov\n ```\n\n## QuickStart\n\nThere is a bunch of great pre-trained NLP models in DeepPavlov. Each model is\ndetermined by its config file.\n\nList of models is available on\n[the doc page](http://docs.deeppavlov.ai/en/master/features/overview.html) in\nthe `deeppavlov.configs` (Python):\n\n```python\nfrom deeppavlov import configs\n```\n\nWhen you're decided on the model (+ config file), there are two ways to train,\nevaluate and infer it:\n\n* via [Command line interface (CLI)](https://github.com/deeppavlov/DeepPavlov/blob/master/#command-line-interface-cli) and\n* via [Python](https://github.com/deeppavlov/DeepPavlov/blob/master/#python).\n\n#### GPU requirements\n\nBy default, DeepPavlov installs models requirements from PyPI. PyTorch from PyPI could not support your device CUDA\ncapability. To run supported DeepPavlov models on GPU you should have [CUDA](https://developer.nvidia.com/cuda-toolkit)\ncompatible with used GPU and [PyTorch version](https://github.com/deeppavlov/DeepPavlov/blob/master/deeppavlov/requirements/pytorch.txt) required by DeepPavlov models.\nSee [docs](https://docs.deeppavlov.ai/en/master/intro/quick_start.html#using-gpu) for details.\nGPU with Pascal or newer architecture and 4+ GB VRAM is recommended.\n\n### Command line interface (CLI)\n\nTo get predictions from a model interactively through CLI, run\n\n```bash\npython -m deeppavlov interact <config_path> [-d] [-i]\n```\n\n* `-d` downloads required data - pretrained model files and embeddings (optional).\n* `-i` installs model requirements (optional).\n\nYou can train it in the same simple way:\n\n```bash\npython -m deeppavlov train <config_path> [-d] [-i]\n```\n\nDataset will be downloaded regardless of whether there was `-d` flag or not.\n\nTo train on your own data you need to modify dataset reader path in the\n[train config doc](http://docs.deeppavlov.ai/en/master/intro/config_description.html#train-config).\nThe data format is specified in the corresponding model doc page.\n\nThere are even more actions you can perform with configs:\n\n```bash\npython -m deeppavlov <action> <config_path> [-d] [-i]\n```\n\n* `<action>` can be\n * `install` to install model requirements (same as `-i`),\n * `download` to download model's data (same as `-d`),\n * `train` to train the model on the data specified in the config file,\n * `evaluate` to calculate metrics on the same dataset,\n * `interact` to interact via CLI,\n * `riseapi` to run a REST API server (see\n [doc](http://docs.deeppavlov.ai/en/master/integrations/rest_api.html)),\n * `predict` to get prediction for samples from *stdin* or from\n *<file_path>* if `-f <file_path>` is specified.\n* `<config_path>` specifies path (or name) of model's config file\n* `-d` downloads required data\n* `-i` installs model requirements\n\n### Python\n\nTo get predictions from a model interactively through Python, run\n\n```python\nfrom deeppavlov import build_model\n\nmodel = build_model(<config_path>, install=True, download=True)\n\n# get predictions for 'input_text1', 'input_text2'\nmodel(['input_text1', 'input_text2'])\n```\n\nwhere\n\n* `install=True` installs model requirements (optional),\n* `download=True` downloads required data from web - pretrained model files and embeddings (optional),\n* `<config_path>` is model name (e.g. `'ner_ontonotes_bert_mult'`), path to the chosen model's config file (e.g.\n `\"deeppavlov/configs/ner/ner_ontonotes_bert_mult.json\"`), or `deeppavlov.configs` attribute (e.g.\n `deeppavlov.configs.ner.ner_ontonotes_bert_mult` without quotation marks).\n\nYou can train it in the same simple way:\n\n```python\nfrom deeppavlov import train_model \n\nmodel = train_model(<config_path>, install=True, download=True)\n```\n\nTo train on your own data you need to modify dataset reader path in the\n[train config doc](http://docs.deeppavlov.ai/en/master/intro/config_description.html#train-config).\nThe data format is specified in the corresponding model doc page.\n\nYou can also calculate metrics on the dataset specified in your config file:\n\n```python\nfrom deeppavlov import evaluate_model \n\nmodel = evaluate_model(<config_path>, install=True, download=True)\n```\n\nDeepPavlov also [allows](https://docs.deeppavlov.ai/en/master/intro/python.html) to build a model from components for\ninference using Python.\n\n## License\n\nDeepPavlov is Apache 2.0 - licensed.\n",
"bugtrack_url": null,
"license": "Apache License, Version 2.0",
"summary": "An open source library for building end-to-end dialog systems and training chatbots.",
"version": "1.7.0",
"project_urls": {
"Download": "https://github.com/deeppavlov/DeepPavlov/archive/1.7.0.tar.gz",
"Homepage": "https://github.com/deeppavlov/DeepPavlov"
},
"split_keywords": [
"nlp",
" ner",
" squad",
" intents",
" chatbot"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "aeafda9d957d8556c21d4df1de50ffe0e034f0fc1485b2e208e664951a7b75e7",
"md5": "c5ccfbc2c8d5d584bbf633d473481ca0",
"sha256": "ebac0cdd6af7509e2102dde223285e0340d4babe9dfab83fac5176013462aee5"
},
"downloads": -1,
"filename": "deeppavlov-1.7.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c5ccfbc2c8d5d584bbf633d473481ca0",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 492663,
"upload_time": "2024-08-12T17:22:54",
"upload_time_iso_8601": "2024-08-12T17:22:54.592867Z",
"url": "https://files.pythonhosted.org/packages/ae/af/da9d957d8556c21d4df1de50ffe0e034f0fc1485b2e208e664951a7b75e7/deeppavlov-1.7.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "fc97f62e1ca402f5dcd41fe594e72a5e1410d35d2b710bf2e92d6a8980f59a8d",
"md5": "299e979b981549f3ca33f50cb345b27e",
"sha256": "196c544b17a5ea8a36a2ad39f5e7aac6770d0506d1322be7a8f25c06bfeb5357"
},
"downloads": -1,
"filename": "deeppavlov-1.7.0.tar.gz",
"has_sig": false,
"md5_digest": "299e979b981549f3ca33f50cb345b27e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 288464,
"upload_time": "2024-08-12T17:22:57",
"upload_time_iso_8601": "2024-08-12T17:22:57.069274Z",
"url": "https://files.pythonhosted.org/packages/fc/97/f62e1ca402f5dcd41fe594e72a5e1410d35d2b710bf2e92d6a8980f59a8d/deeppavlov-1.7.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-12 17:22:57",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "deeppavlov",
"github_project": "DeepPavlov",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "deeppavlov"
}