Spaces:
Runtime error
Runtime error
from transformers import AutoModelForSequenceClassification,AutoTokenizer | |
# ##***********************************************************************************************************## | |
# ###FOR SENTIMENT CLASSIFICATION | |
# chkpt='distilbert-base-uncased-finetuned-sst-2-english' | |
# | |
# model=AutoModelForSequenceClassification.from_pretrained(chkpt) | |
# tokenizer=AutoTokenizer.from_pretrained(chkpt) | |
# | |
# #save the pertrained model | |
# model.save_pretrained('sentiment_classifier/') | |
# tokenizer.save_pretrained('sentiment_classifier/') | |
# ##***********************************************************************************************************## | |
# # ##***********************************************************************************************************## | |
# # ###FOR Zero Shot Text Classification | |
# chkpt='valhalla/distilbart-mnli-12-1' | |
# | |
# model=AutoModelForSequenceClassification.from_pretrained(chkpt) | |
# tokenizer=AutoTokenizer.from_pretrained(chkpt) | |
# | |
# #save the pertrained model | |
# model.save_pretrained('zero_shot_clf/') | |
# tokenizer.save_pretrained('zero_shot_clf/') | |
# # ##***********************************************************************************************************## |