A Python library for the SmartLens API.
Project description
SmartLens Python Library
The SmartLens Python library provides convenient access to the SmartLens API from applications written in the Python language. Integrate state-of-the-art AI into your application in just five lines of code.
Documentation
See the API docs.
Installation
To install the package, simply run:
pip install smartlens
Requirements
- Python 3.6+
Usage
The library needs to be configured with your account's API key which is
available in the SmartLens Dashboard. Set smartlens.api_key
to its
value:
import smartlens
smartlens.api_key = "YOUR-API-KEY"
# tag image
tags = smartlens.tagImage(
image = "path/to/my/image"
)
# caption image
captions = smartlens.captionImage(
image = "path/to/my/image"
)
# process document
extractedItems = smartlens.runDocumentAI(
document = "path/to/my/document",
customExtractions = [{'natural_language_query': 'What is the salary?', 'answer_key': 'employee_salary'}] # Custom extractions are optional
)
# process text document
extractedItems = smartlens.runTextAnalysis(
text = "path/to/my/text",
customExtractions = [{'natural_language_query': 'What is the salary?', 'answer_key': 'employee_salary'}] # Custom extractions are optional
)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
File details
Details for the file smartlens-0.9.0-py3-none-any.whl
.
File metadata
- Download URL: smartlens-0.9.0-py3-none-any.whl
- Upload date:
- Size: 2.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9178219e76a782bcf016aad023665915711ccfbd1dd61ab422e639571abf17bd |
|
MD5 | eaeb9266e80324f12e7215b011d31254 |
|
BLAKE2b-256 | 1531c55be360abef9d9d44c6646a60c04265f5ccf238a0cf9e74c01da3f0da67 |