how to save the model ?
Closed this issue · 3 comments
Tlntin commented
I want to save model, so i can use it for next time.
I can't found how to do it in example
Tlntin commented
i try to use pickle to save and load scrapper, it work well.
lorey commented
Hi @Tlntin, thanks for getting in touch and even posting the answer you found. Would also be my solution of choice for now. Time for me to create some kind of documentation, I guess...
entrptaher commented
Sample code for future reference,
# train the model
scraper = train_scraper(training_set)
# save the file for future use
file = open('model.pickle', 'wb')
pickle.dump(scraper, file)
file.close()
# load it later
file = open('model.pickle', 'rb')
scraper = pickle.load(file)
file.close()