Skip to content

Commit

Permalink
Upgrade nerd version to dowload model on Dockerfile.
Browse files Browse the repository at this point in the history
  • Loading branch information
abdullahselek committed Aug 23, 2019
1 parent f7c9373 commit 8903929
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 46,7 @@ RUN cd ~ && \
RUN apt-get -y install python3-pip
RUN pip3 install -r requirements.txt --upgrade
RUN pip3 install "connexion[swagger-ui]"
RUN python3 -m nerd -d en_core_web_sm

COPY . /usr/src/app

Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 2,8 @@ connexion == 2.2.0
python_dateutil == 2.6.0
setuptools >= 21.0.0
mocr >= 0.2.1
facereg == 0.2.1.2
ner-d == 0.1
facereg >= 0.2.1.2
ner-d >= 0.2
redis >= 3.2.0
uWSGI >= 2.0.18
python-crontab >= 2.3.6
Expand Down
3 changes: 3 additions & 0 deletions vl/controllers/default_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 258,9 @@ def verify(body): # noqa: E501
text_validation_point = validate_text_label(doc_text_label, user_text_label)
print('text_validation_point: ' str(text_validation_point))
names = recognize_face(user_id)
if not names:
response = Error(code=400, message='Can not recognize face from identity card.')
return response, 400
face_validation_point = point_on_recognition(names, user_id)
print('face_validation_point: ' str(face_validation_point))
verification_rate = text_validation_point face_validation_point
Expand Down

0 comments on commit 8903929

Please sign in to comment.