Copy and paste this Python code into your script to download the model and vectorizer directly from GitHub.
import requests # Download model model_url = "https://raw.githubusercontent.com/abhisheksahoo15/spamdetect/main/modelmnb.pkl" model_response = requests.get(model_url) with open("modelmnb.pkl", "wb") as f: f.write(model_response.content) # Download vectorizer vectorizer_url = "https://raw.githubusercontent.com/abhisheksahoo15/spamdetect/main/vectorizer.pkl" vectorizer_response = requests.get(vectorizer_url) with open("vectorizer.pkl", "wb") as f: f.write(vectorizer_response.content) print("Download complete.")