나무위키요약프로그램 썸네일형 리스트형 셀레니움, Kobart-summarization을 이용한 나무위키 목차별 요약 import torch from transformers import PreTrainedTokenizerFast from transformers import BartForConditionalGeneration def model_load(model_name): tokenizer = PreTrainedTokenizerFast.from_pretrained(f"{model_name}/kobart-summarization") model = BartForConditionalGeneration.from_pretrained(f"{model_name}/kobart-summarization") return model, tokenizer def preprocessing(text): text = text.replace('[[0.. 더보기 이전 1 다음