Unggi commited on
Commit
2a014dc
1 Parent(s): fb622a8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -3
app.py CHANGED
@@ -84,9 +84,15 @@ def inference(prompt):
84
 
85
  cos_df["word"].values
86
 
87
- outputs = " ".join(["#" + s for s in cos_df["word"].values])
88
-
89
- outputs
 
 
 
 
 
 
90
 
91
  return outputs
92
 
 
84
 
85
  cos_df["word"].values
86
 
87
+ # 명사만 추출
88
+ outputs = []
89
+ for word in cos_df["word"].values:
90
+ okt = Okt()
91
+ tokenized_doc = okt.pos(word)
92
+ tokenized_nouns = ' '.join([word[0] for word in tokenized_doc if word[1] == 'Noun'])
93
+ outputs.append("#" + tokenized_nouns)
94
+
95
+ outputs = " ".join(outputs)
96
 
97
  return outputs
98