Designing and Implementing a Microsoft Azure AI Solution — Question 76
You have the following Python function for creating Azure Cognitive Services resources programmatically. def create_resource (resource_name, kind, account_tier, location) : parameters = CognitiveServicesAccount(sku=Sku(name=account_tier), kind=kind, location=location, properties={}) result = client.accounts.create(resource_group_name, resource_name, parameters)
You need to call the function to create a free Azure resource in the West US Azure region. The resource will be used to generate captions of images automatically.
Which code should you use?
Answer options
- A. create_resource("res1", "ComputerVision", "F0", "westus")
- B. create_resource("res1", "CustomVision.Prediction", "F0", "westus")
- C. create_resource("res1", "ComputerVision", "S0", "westus")
- D. create_resource("res1", "CustomVision.Prediction", "S0", "westus")
Correct answer: A
Explanation
The correct answer is A because 'ComputerVision' is the appropriate service for generating captions, and 'F0' indicates the free tier. Options B, C, and D are incorrect as they either use an unsuitable service for caption generation or specify a paid tier ('S0').