Python SDK for the ASpace AI cognitive services
Project description
ASpace AI API: Python SDK & Sample
This repo contains the Python SDK for the ASpace AI cognitive services, an offering within ASpace AI Cognitive Services
Getting started
Install the module using pip:
pip install aspaceai
Use it:
import aspaceai
import json
# SET ASPACE AI Platform endpoint url
aspaceai.ASPACE_URL = 'https://<ASPACE-INSTANCE-URL>/' # Replace with your aspace endpoint URL
# SET ASPACE AI Cognitive Service API Key
aspaceai.ASPACE_API_KEY = 'ASpace subscription key' # Replace with a valid Subscription Key here.
image_url = '<Image URL>' # Path or Location of image
"""
image: Image information on which to perform OCR.
image_format: url, file ,base64string
language: default = eng
Supported Languages : ["afr","amh","ara","asm","aze","aze-cyrl","bel","ben","bod","bos","bul","cat","ceb","ces","chi-sim","chi-tra","chr","cym","dan",
"dan-frak","deu","deu-frak","dev","dzo","ell","eng","enm","epo","est","eus","fas","fin","fra","frk","frm","gle","gle-uncial","glg","grc",
"guj","hat","heb","hin","hrv","hun","iku","ind","isl","ita","ita-old","jav","jpn","kan","kat","kat-old","kaz","khm","kir","kor","kur",
"lao","lat","lav","lit","mal","mar","mkd","mlt","msa","mya","nep","nld","nor","ori","pan","pol","por","pus","ron","rus","san","sin",
"slk","slk-frak","slv","spa","spa-old","sqi"]
"""
result = aspaceai.vision.ocr(image=image_url,image_format='url',language='eng')
# Result from ASpace AI
print (json.loads(result)['status'])
print (json.loads(result)['message'])
Installing from the source code
python setup.py install
Contributing
We welcome contributions. Feel free to file issues and pull requests on the repo and we'll address them as we can. Learn more about how you can help on our Contribution Rules & Guidelines.
You can reach out to us anytime with questions and suggestions using our communities below:
- Support questions: StackOverflow
Updates
License
All ASpace Cognitive Services SDKs and samples are licensed with the MIT License. For more details, see LICENSE.
Developer Code of Conduct
Developers using Cognitive Services, including this sample, are expected to follow the “Developer Code of Conduct for ASpace AI”, found at https://www.ey.com/en_in/consulting/accelerating-digital-transformation-with-ai.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for aspaceai-1.0.12-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0c37428917aef12654a3aaf3c269103067b8bcea0a85585c2eadc2054ad3944 |
|
MD5 | 0e301f52668b3346f6797a3cebf57dd5 |
|
BLAKE2b-256 | c4fb1b175420094de3d80bf44e520584a7b3ef527bbae9da30f5236b3f4aac08 |