- Python 3.6 or higher
$ pip install -r requirements.txtYou will need to acquire below values by contacting Lucidtech
- API key (<api_key>)
- AWS Access Key Id (<access_key_id>)
- AWS Secret Access Key (<secret_access_key>)
- API Endpoint Prefix (<endpoint_prefix>)
Note: Your REST API endpoint might not have support for all prediction types
Invoice prediction:
$ python src/main.py https://<endpoint_prefix>.api.lucidtech.ai/v1 <api_key> <access_key_id> <secret_access_key> invoice_prediction invoice.pdf application/pdf
$ python src/main.py https://<endpoint_prefix>.api.lucidtech.ai/v1 <api_key> <access_key_id> <secret_access_key> invoice_prediction invoice.jpeg image/jpegReceipt prediction:
$ python src/main.py https://<endpoint_prefix>.api.lucidtech.ai/v1 <api_key> <access_key_id> <secret_access_key> receipt_prediction receipt.pdf application/pdf
$ python src/main.py https://<endpoint_prefix>.api.lucidtech.ai/v1 <api_key> <access_key_id> <secret_access_key> receipt_prediction receipt.jpeg image/jpegDocument split:
$ python src/main.py https://<endpoint_prefix>.api.lucidtech.ai/v1 <api_key> <access_key_id> <secret_access_key> document_split document.pdf application/pdfFor APIs that encrypt S3 data with a custom KMS key instead of the default S3 key you need to provide the following flag to the program.
--with_s3_kms
An example
$ python src/main.py https://<endpoint_prefix>.api.lucidtech.ai/v1 <api_key> <access_key_id> <secret_access_key> --with_s3_kms invoice_prediction invoice.pdf application/pdf