Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -84,9 +84,15 @@ def inference(prompt):
|
|
84 |
|
85 |
cos_df["word"].values
|
86 |
|
87 |
-
|
88 |
-
|
89 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
|