Spaces:
Runtime error
Runtime error
Update util/keywordExtract.py
Browse files- util/keywordExtract.py +3 -3
util/keywordExtract.py
CHANGED
|
@@ -18,9 +18,9 @@ def load_company_list(file_path='상장법인목록.xls'):
|
|
| 18 |
return df['회사명'].dropna().tolist()
|
| 19 |
|
| 20 |
# ✅ 요약용 KoBART
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
|
| 25 |
def summarize_kobart(text):
|
| 26 |
input_ids = summary_tokenizer.encode(text, return_tensors="pt")
|
|
|
|
| 18 |
return df['회사명'].dropna().tolist()
|
| 19 |
|
| 20 |
# ✅ 요약용 KoBART
|
| 21 |
+
summary_tokenizer = PreTrainedTokenizerFast.from_pretrained("gogamza/kobart-summarization")
|
| 22 |
+
summary_model = BartForConditionalGeneration.from_pretrained("gogamza/kobart-summarization")
|
| 23 |
+
|
| 24 |
|
| 25 |
def summarize_kobart(text):
|
| 26 |
input_ids = summary_tokenizer.encode(text, return_tensors="pt")
|