Skip to content

Commit bf06675

Browse files
authored
fix python deploy model code
1 parent 719eefc commit bf06675

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

articles/machine-learning/how-to-deploy-models-from-huggingface.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,9 @@ ml_client.online_deployments.begin_create_or_update(ManagedOnlineDeployment(
8585
instance_type="Standard_DS2_v2",
8686
instance_count=1,
8787
)).wait()
88+
endpoint = ml_client.online_endpoints.get(endpoint_name)
8889
endpoint.traffic = {"demo": 100}
89-
ml_client.begin_create_or_update(endpoint_name).result()
90+
ml_client.begin_create_or_update(endpoint).result()
9091
```
9192

9293
### Test the deployed model

0 commit comments

Comments
 (0)