Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -51,7 +51,7 @@ def sentence_convert_data(data):
|
|
51 |
segments = np.array(segments)
|
52 |
return [tokens, masks, segments]
|
53 |
|
54 |
-
def
|
55 |
data_x = sentence_convert_data(sentence)
|
56 |
predict = sentiment_model.predict(data_x)
|
57 |
predict_value = np.ravel(predict)
|
@@ -140,7 +140,7 @@ def main():
|
|
140 |
|
141 |
st.subheader("댓글")
|
142 |
for comment in comments:
|
143 |
-
if
|
144 |
st.write(comment)
|
145 |
return 0
|
146 |
|
|
|
51 |
segments = np.array(segments)
|
52 |
return [tokens, masks, segments]
|
53 |
|
54 |
+
def evaluation_predict(sentence):
|
55 |
data_x = sentence_convert_data(sentence)
|
56 |
predict = sentiment_model.predict(data_x)
|
57 |
predict_value = np.ravel(predict)
|
|
|
140 |
|
141 |
st.subheader("댓글")
|
142 |
for comment in comments:
|
143 |
+
if evaluation_predict(comment) == 1:
|
144 |
st.write(comment)
|
145 |
return 0
|
146 |
|