File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1- from azure .cognitiveservices .search .entitysearch import EntitySearchAPI
1+ from azure .cognitiveservices .search .entitysearch import EntitySearchClient
22from azure .cognitiveservices .search .entitysearch .models import Place , ErrorResponseException
33from msrest .authentication import CognitiveServicesCredentials
44
55# Add your Bing Entity Search subscription key to your environment variables.
66SUBSCRIPTION_KEY = os .environ ['BING_ENTITY_SEARCH_SUBSCRIPTION_KEY' ]
7-
7+ ENDPOINT = os . environ [ 'BING_ENTITY_SEARCH_ENDPOINT' ]
88
99def dominant_entity_lookup (subscription_key ):
1010 """DominantEntityLookup.
1111
1212 This will look up a single entity (Satya Nadella) and print out a short description about them.
1313 """
14- client = EntitySearchAPI (
15- endpoint = "https://api.cognitive.microsoft.com" ,
14+ client = EntitySearchClient (
15+ endpoint = ENDPOINT ,
1616 credentials = CognitiveServicesCredentials (subscription_key )
1717 )
1818
You can’t perform that action at this time.
0 commit comments