...
/LUIS App Using SDK - Training, Publishing and Consuming the Model
LUIS App Using SDK - Training, Publishing and Consuming the Model
Learn to build and consume LUIS app using Python SDK for Azure's LUIS service.
We'll cover the following...
We'll cover the following...
In the previous lesson we created a LUIS app, added the intent and entity, and added the utterances to the intent. Now let’s move on to training.
Training the LUIS app
The next step is to train the LUIS app. We’ll train the LUIS app by calling the train_version()
method using the luis_client
object that we created in the previous lesson.
Press + to interact
C++
luis_client.train.train_version(luis_app_id, version_id)training_not_completed = Truewhile training_not_completed:training_info = luis_client.train.get_status(luis_app_id, version_id)for i in range(len(training_info)):if training_info[i].details.status == "Queued" or training_info[i].details.status == "InProgress":print("Waiting for 1 second for the training to get completed!")time.sleep(1)else:print("LUIS app is trained successfully!")training_not_completed = Falsebreak
Explanation:
-
In line 1, we call the
train_version()
method and pass the app ID and the version ID to the function to start the training. This can be verified ...