Sign inSign up

blockaero/classify-fasttext

By blockaero

•Updated about 6 years ago

Image
0

1.5K

blockaero/classify-fasttext repository overview

⁠Overview

This supports the classification of text files.

Refer to classification dataset⁠ You must be aware of the number of lables used for classification.

As of December 13, 2018, there are 9 labels used. Set ENV NUMBER_OF_LABELS=9 in the Dockerfile⁠

Classification model is trained currently with large number of ARC documents, therefore it has bias towards that class. If the document given is ARC, you shuold get a 100% probability. If it is less than 1, (100%), normally it is UNKNOWN.

⁠Making changes and redeploying service

./deploy.sh DEV classify-fasttext

⁠Testing endpoint without initiating the entire pipeline

//add the following header if you dont want the chaining action of the pipeline.
-H "strategy:{}"

⁠DEV

//this will work only in dev.
//the reason is, async-function is exposed only in DEV.
//in production the orchestration happens via the orchestration overlay network.
arc="$(cat sample_arc.txt)"
//if you want to do only upload - without doing any further steps
curl -v  http://localhost/async-function/classify-fasttext \
       -d "$(echo "$arc")"  \
       -H "page:1" \
       -H "X-Callback-Url: http://webhook/" \
       -H "X-Api-Key:$api_key"

⁠Expected Response

{
  "action": "classify",
  "endpoint": "classify-fasttext",
  "page": 1,
  "result": {
    "classification": ["ARC"],
    "details": {
      "ARC": 1.0000100135803223,
      "TASKCARD": 1.0000003385357559e-05,
      "TESTCELL": 1.0000003385357559e-05,
      "LLPLIST": 1.0000003385357559e-05,
      "MODLIST": 1.0000003385357559e-05,
      "ADSB": 1.0000003385357559e-05,
      "ACCESSORYLIST": 1.0000003385357559e-05,
      "SERVICEABLETAG": 1.0000003385357559e-05,
      "BORESCOPE": 1.0000003385357559e-05
    }
  },
  "status": 200,
  "total_time_taken": "2.972723960876465",
  "next_action": "extract-fields",
  "next_action_response": 202
}

Tag summary

Content type

Image

Digest

Size

808.3 MB

Last updated

about 6 years ago

docker pull blockaero/classify-fasttext:a16559384be15ed4c5a33601187fb549df80e88b