ASPACE_API_URL = '' # Replace with your aspace endpoint URL aspaceai. loads ( result )) '''- EYE DETECTION -''' import aspaceai import json import cv2 import numpy as np import base64 aspaceai. destroyAllWindows () else : print ( json. imshow ( "Output From ASpaceAI", img ) cv2. b64decode ( base64_image_string ) jpg_as_np = np. lower () = 'success' : base64_image_string = json. face_detection_image ( image, image_format ) operation_status = json. image = "" image_format = "url" result = aspaceai. ASPACE_API_KEY = '' # Replace with a valid Subscription Key here. loads ( result )) '''- FACE DETECTION -''' import aspaceai import json import cv2 import numpy as np import base64 aspaceai. tags_extraction ( text ) operation_status = json. text = "European authorities fined Google a record $5.1 billion on Wednesday for abusing its power in the mobile phone market and ordered the company to alter its practices" result = aspaceai. loads ( result )) '''- TAGS EXTRACTION-''' import aspaceai import json aspaceai. dependency_parser ( text ) operation_status = json. loads ( result )) '''- DEPENDENCY PARSER-''' import aspaceai import json aspaceai. named_entity_recognition ( text ) operation_status = json. loads ( result )) '''- NAMED ENTITY RECOGNITION -''' import aspaceai import json aspaceai. part_of_speech ( text ) operation_status = json. text = "The quick brown fox jumps over the lazy dog" result = aspaceai. loads ( result )) '''- PART OF SPEECH -''' import aspaceai import json aspaceai. ocr ( image = image_url, image_format = 'url', language = 'eng' ) operation_status = json. Use it: '''- OCR -''' import aspaceai import json aspaceai. Install the module using pip: pip install aspaceai This repo contains the Python SDK for the ASpace AI cognitive services, an offering within ASpace AI Cognitive Services
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |