Skip to content

Commit f86609f

Browse files
authored
Merge pull request #111573 from pete88b/patch-2
fix python deploy model code
2 parents 2b125ea + bf06675 commit f86609f

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
@@ -83,8 +83,9 @@ ml_client.online_deployments.begin_create_or_update(ManagedOnlineDeployment(
8383
instance_type="Standard_DS2_v2",
8484
instance_count=1,
8585
)).wait()
86+
endpoint = ml_client.online_endpoints.get(endpoint_name)
8687
endpoint.traffic = {"demo": 100}
87-
ml_client.begin_create_or_update(endpoint_name).result()
88+
ml_client.begin_create_or_update(endpoint).result()
8889
```
8990

9091
### Test the deployed model

0 commit comments

Comments
 (0)