Zmei REST API

Zmei Rest API is created to process text chunks or paragraphs by sending simple requests, without creating a specific Excel file. Allows straightforward pull of the data from Kafka for processing.

Application architecture:

The service gets POST request with language and the text and returns a dictionary with top 2 subheadings and their corresponding scores. Supporting multithreading and multiple workers if required.

Supported languages:

| Current version | |--------------------| | English |

Send requests via REST

You can see the example of the request via Python in the test/test.py file. Based on this logic curl or any other requests are also applicable.

Run the whole application with docker-compose

  1. Install docker-compose (e.g. pip install docker-compose)
  2. Download (from GCP 'flair-models' bucket) and place listed current versions (10.03.2022) of models as described below in folders structure:
  3. Place docker-compose_template.yaml as in the project structure, modify it according to models names.

Use docker-compose-ners-gcp.yaml or local version to deploy the whole app as in prod.

  1. The REST part of the app cannot be run withou whole application, because it relies on internal model service. To run entire docker-compose use:

sudo docker-compose -f docker-compose_template.yaml up --build

-f - flag for a filename, skip this if your file is 'docker-compose.yaml'
--build - rebuild containers
--detach - run docker compose as daemon