Deploy a model and classify text using the runtime API
After you're satisfied with your model, and made any necessary improvements, you can deploy it and start classifying text. Deploying a model makes it available for use through the runtime API.
Prerequisites
- A custom text classification project with a configured Azure blob storage account,
- Text data that has been uploaded to your storage account.
- Tagged data and successfully trained model
- Reviewed the model evaluation details to determine how your model is performing.
- (optional) Made improvements to your model if its performance isn't satisfactory.
See the application development lifecycle for more information.
Deploy your model
Deploying a model hosts it and makes it available for predictions through an endpoint.
When a model is deployed, you will be able to test the model directly in the portal or by calling the API associated with it.
Note
You can only have ten deployment names.
Go to your project in Language studio.
From the left panel, select Deploy model.
Click on Add deployment to submit a new deployment job.
In the window that appears, you can create a new deployment name by or override an existing one. Then, you can add a trained model to this deployment name.
Delete deployment
To delete a deployment, select the deployment you want to delete and click Delete deployment
Tip
You can test your model in Language Studio by sending samples of text for it to classify.
Send a text classification request to your model
Using Language studio
After the deployment is completed, select the model you want to use and from the top menu click on Get prediction URL and copy the URL and body.
In the window that appears, under the Submit pivot, copy the sample request into your command line
Replace
<YOUR_DOCUMENT_HERE>with the actual text you want to classify.Submit the request
In the response header you receive extract
jobIdfromoperation-location, which has the format:{YOUR-ENDPOINT}/text/analytics/v3.2-preview.2/analyze/jobs/<jobId}>Copy the retrieve request and replace
<OPERATION-ID>withjobIdreceived from the last step and submit the request.
You will need to use the REST API. Click on the REST API tab above for more information.
Povratne informacije
Pošalјite i prikažite povratne informacije za