hyomin commited on
Commit
a246e1c
1 Parent(s): c26657b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -1,6 +1,6 @@
1
  import pandas as pd
2
  import numpy as np
3
- from konlpy.tag import Okt
4
  from string import whitespace, punctuation
5
  import re
6
  import unicodedata
@@ -14,7 +14,6 @@ from transformers import PreTrainedTokenizerFast, BartForConditionalGeneration
14
  from transformers import BartForConditionalGeneration, PreTrainedTokenizerFast
15
  from transformers.optimization import get_cosine_schedule_with_warmup
16
  from torch.utils.data import DataLoader, Dataset
17
- from konlpy.tag import Okt
18
 
19
  # classification
20
 
@@ -61,9 +60,9 @@ def is_clickbait(title, content, threshold=0.815):
61
  content = TextFilter(content)
62
 
63
  # Noun Extraction
64
- okt = Okt()
65
- title = ' '.join(okt.nouns(title))
66
- content = ' '.join(okt.nouns(content))
67
 
68
  # Compute embedding
69
  embeddings1 = model.encode(title, convert_to_tensor=True)
 
1
  import pandas as pd
2
  import numpy as np
3
+ # from konlpy.tag import Okt
4
  from string import whitespace, punctuation
5
  import re
6
  import unicodedata
 
14
  from transformers import BartForConditionalGeneration, PreTrainedTokenizerFast
15
  from transformers.optimization import get_cosine_schedule_with_warmup
16
  from torch.utils.data import DataLoader, Dataset
 
17
 
18
  # classification
19
 
 
60
  content = TextFilter(content)
61
 
62
  # Noun Extraction
63
+ # okt = Okt()
64
+ # title = ' '.join(okt.nouns(title))
65
+ # content = ' '.join(okt.nouns(content))
66
 
67
  # Compute embedding
68
  embeddings1 = model.encode(title, convert_to_tensor=True)