Views
No views yet
1import joblib
2from huggingface_hub import hf_hub_download
3
4# Download the model from Hugging Face
5model_path = hf_hub_download(repo_id="your_username/multi-nb-tfidf-model", filename="multi-nb-tfidf-model.pkl")
6
7# Load the model
8model = joblib.load(model_path)
9
10# Use the model for predictions
11sample_text = ["Example text to classify"]
12predictions = model.predict(sample_text)
13print(predictions)