Error while deploying azure custom text classification model

Gopu Shaji 6 Reputation points
2022-11-03T08:58:33.013+00:00

My requirement is to create a model that can classify given text into one of the four pre defined categories.
I have uploaded the text as documents and labelled them on azure. I successfully trained a text classification model and did the model evaluation as well.

Now, when I deploy the model and try to perform API call using python, its giving me an error as 'TextAnalyticsClient' object has no attribute 'begin_single_label_classify'. I have followed the azure documentation and it is the same attribute 'begin_single_label_classify' given there. So what should be the problem that is causing the error?

Azure AI Language
Azure AI Language
An Azure service that provides natural language capabilities including sentiment analysis, entity extraction, and automated question answering.
520 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Gopu Shaji 6 Reputation points
    2022-11-08T10:41:50.347+00:00

    Hi @YutongTie-MSFT ,

    Thanks for your response.
    I am pasting the link to the GitHub document which I found on Azure documentation.

    https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/textanalytics/azure-ai-textanalytics/samples/sample_single_label_classify.py

    On customizing this code and running for my requirement, I am getting the error as:
    'TextAnalyticsClient' object has no attribute 'begin_single_label_classify'

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.