Views
No views yet
.pkl files and load them using Python.1from huggingface_hub import hf_hub_download
2import pickle
3
4# Load the model and vectorizer
5model_path = hf_hub_download(repo_id="<your-username>/<your-model-name>", filename="intent_model.pkl")
6vectorizer_path = hf_hub_download(repo_id="<your-username>/<your-model-name>", filename="vectorizer_intent.pkl")
7
8with open(model_path, "rb") as f:
9 model = pickle.load(f)
10
11with open(vectorizer_path, "rb") as f:
12 vectorizer = pickle.load(f)
13
14print("Model and vectorizer successfully loaded!")