Skip to content
Snippets Groups Projects
Commit 1b3c4499 authored by Andreas Steenpaß's avatar Andreas Steenpaß
Browse files

incorporate feedback in usage instructions

parent 8c060699
Branches master
No related tags found
No related merge requests found
Pipeline #953923 passed
...@@ -12,19 +12,24 @@ There, they can be found in the subdirectory `Entity_Recognition/ner_model`. ...@@ -12,19 +12,24 @@ There, they can be found in the subdirectory `Entity_Recognition/ner_model`.
## Container image ## Container image
The container images generated from this repository can be found at: The container images generated from this repository can be found at:
``` ```
hub.cc-asp.fraunhofer.de/ai4media-public/named-entity-recognition-flair:[tag] hub.cc-asp.fraunhofer.de/ai4media-public/named-entity-recognition-flair:[tag]
``` ```
The image with the tag `latest` corresponds to the latest commit on the main branch. The image with the tag `latest` corresponds to the latest commit on the main branch.
## Usage ## Usage
This repository contains an example python client. To run the example, do the following: This repository contains an example python client. To run the example, do the following:
``` ```
docker pull hub.cc-asp.fraunhofer.de/ai4media-public/named-entity-recognition-flair:latest docker pull hub.cc-asp.fraunhofer.de/ai4media-public/named-entity-recognition-flair:latest
docker run -p 127.0.0.1:8061:8061 hub.cc-asp.fraunhofer.de/ai4media-public/named-entity-recognition-flair:latest docker run -p 127.0.0.1:8061:8061 hub.cc-asp.fraunhofer.de/ai4media-public/named-entity-recognition-flair:latest
``` ```
Then, in another terminal: Then, in another terminal:
``` ```
git clone https://gitlab.cc-asp.fraunhofer.de/ai4media/public/wp7/named-entity-recognition-flair.git git clone https://gitlab.cc-asp.fraunhofer.de/ai4media/public/wp7/named-entity-recognition-flair.git
cd named-entity-recognition-flair cd named-entity-recognition-flair
...@@ -33,4 +38,11 @@ source venv/Scripts/activate ...@@ -33,4 +38,11 @@ source venv/Scripts/activate
pip install -r requirements.txt pip install -r requirements.txt
python ner_client.py python ner_client.py
``` ```
You should see some log output with two recognized entities.
Depending on your system, the command for activating the virtual environment might be ``source venv/bin/activate``
instead of ``source venv/Scripts/activate``. The requirements.txt file also includes ``flair`` and ``torch`` which are
used for developing the application and building the container image. But these packages are not necessary for running
the python example client. So if you do not want to install these rather big packages in the virtual environment, just
delete them from ``requirements.txt`` beforehand.
As a result of the above example, you should see some log output with two recognized entities.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment