-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #501 from deeppavlov/dev
Release v1.7.0
- Loading branch information
Showing
85 changed files
with
3,462 additions
and
231 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
FROM tensorflow/tensorflow:1.15.2-gpu | ||
|
||
WORKDIR /src | ||
|
||
RUN apt-key del 7fa2af80 && \ | ||
rm -f /etc/apt/sources.list.d/cuda*.list && \ | ||
curl https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-keyring_1.0-1_all.deb \ | ||
-o cuda-keyring_1.0-1_all.deb && \ | ||
dpkg -i cuda-keyring_1.0-1_all.deb | ||
RUN apt-get -y update | ||
RUN apt-get install -y build-essential zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget llvm \ | ||
libncurses5-dev libncursesw5-dev xz-utils libffi-dev liblzma-dev | ||
|
||
RUN apt-get -y update && \ | ||
apt-get install -y software-properties-common && \ | ||
apt-get update && apt-get install git -y | ||
|
||
RUN apt-get install -y sqlite3 | ||
|
||
ARG LANGUAGE=EN | ||
ENV LANGUAGE ${LANGUAGE} | ||
|
||
ARG CONFIG | ||
ARG PORT | ||
ARG SRC_DIR | ||
ARG SED_ARG=" | " | ||
|
||
ENV CONFIG=$CONFIG | ||
ENV PORT=$PORT | ||
|
||
COPY ./annotators/custom_entity_linking/requirements.txt ./requirements.txt | ||
RUN pip install -r ./requirements.txt | ||
|
||
COPY $SRC_DIR . | ||
|
||
|
||
RUN python -m deeppavlov install $CONFIG && \ | ||
python -c "import nltk; nltk.download('stopwords')" | ||
|
||
RUN sed -i "s|$SED_ARG|g" "$CONFIG" | ||
|
||
CMD gunicorn --workers=1 --timeout 500 server:app -b 0.0.0.0:${PORT} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
favorite animal | ||
like animal | ||
favorite book | ||
like read | ||
favorite movie | ||
favorite food | ||
like food | ||
favorite drink | ||
like drink | ||
favorite sport | ||
like sports |
34 changes: 34 additions & 0 deletions
34
annotators/custom_entity_linking/custom_entity_linking.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"chainer": { | ||
"in": ["user_ids", "entity_substr", "entity_tags"], | ||
"pipe": [ | ||
{ | ||
"class_name": "src.entity_linking:EntityLinker", | ||
"in": ["user_ids", "entity_substr", "entity_tags"], | ||
"out": ["entity_ids", "entity_conf", "entity_id_tags"], | ||
"load_path": "{DOWNLOADS_PATH}/entity_linking_eng/custom_el_eng_dream", | ||
"rank_in_runtime": true, | ||
"num_entities_for_bert_ranking": 20, | ||
"use_gpu": false, | ||
"include_mention": false, | ||
"num_entities_to_return": 5, | ||
"lemmatize": true, | ||
"use_tags": true, | ||
"use_descriptions": true, | ||
"full_paragraph": true, | ||
"return_confidences": true, | ||
"lang": "en" | ||
} | ||
], | ||
"out": ["entity_substr", "entity_ids", "entity_conf", "entity_id_tags"] | ||
}, | ||
"metadata": { | ||
"variables": { | ||
"ROOT_PATH": "~/.deeppavlov", | ||
"DOWNLOADS_PATH": "{ROOT_PATH}/downloads", | ||
"MODELS_PATH": "{ROOT_PATH}/models", | ||
"TRANSFORMER": "{DOWNLOADS_PATH}/torch_bert_models/bert_small", | ||
"CONFIGS_PATH": "{DEEPPAVLOV_PATH}/configs" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Flask==1.1.1 | ||
nltk==3.2.5 | ||
gunicorn==19.9.0 | ||
requests==2.22.0 | ||
sentry-sdk==0.12.3 | ||
rapidfuzz==0.7.6 | ||
deeppavlov==0.17.2 | ||
itsdangerous==2.0.1 | ||
jinja2<=3.0.3 | ||
Werkzeug<=2.0.3 | ||
cryptography==2.8 |
Oops, something went wrong.