Last active
          November 21, 2022 11:31 
        
      - 
      
- 
        Save vinayvinay/916d492fb0288b8d17fe3b21b61d3f93 to your computer and use it in GitHub Desktop. 
    central-ds-hands-on-infra-setup-workshop
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | 3.9.10 | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import numpy as np | |
| from modelstore.model_store import ModelStore | |
| model_store = ModelStore.from_gcloud("gc-prd-central-ds-prod-1c1c", "gc-production-central-ds-modelstore-production") | |
| knn = model_store.load("centralds_workshop_iris", "0fcba14a-fcfe-4255-8974-9f3deb7ae313") | |
| X_new = np.array([[5, 2.9, 1, 0.2]]) | |
| prediction = knn.predict(X_new) | |
| print("Prediction: {}".format(prediction)) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | google-cloud-storage==2.5.0 | |
| modelstore==0.0.75 | |
| numpy==1.23.4 | |
| scikit-learn==1.0.0 | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment