Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -17,7 +17,7 @@ tokenizer = BertTokenizer.from_pretrained('bert-base-multilingual-cased')
|
|
17 |
|
18 |
def create_sentiment_bert():
|
19 |
# ๋ฒํธ pretrained ๋ชจ๋ธ ๋ก๋
|
20 |
-
model =
|
21 |
# ํ ํฐ ์ธํ, ๋ง์คํฌ ์ธํ, ์ธ๊ทธ๋จผํธ ์ธํ ์ ์
|
22 |
token_inputs = tf.keras.layers.Input((SEQ_LEN,), dtype=tf.int32, name='input_word_ids')
|
23 |
mask_inputs = tf.keras.layers.Input((SEQ_LEN,), dtype=tf.int32, name='input_masks')
|
@@ -64,4 +64,4 @@ def movie_evaluation_predict(sentence):
|
|
64 |
st.write("(๊ธ์ ํ๋ฅ : %.2f) ๊ธ์ ์ ์ธ ์ํ ํ๊ฐ์
๋๋ค." % predict_value)
|
65 |
|
66 |
sentiment_model = create_sentiment_bert()
|
67 |
-
movie_evaluation_predict("
|
|
|
17 |
|
18 |
def create_sentiment_bert():
|
19 |
# ๋ฒํธ pretrained ๋ชจ๋ธ ๋ก๋
|
20 |
+
model = TFAutoModel.from_pretrained(PATH,local_files_only=True)
|
21 |
# ํ ํฐ ์ธํ, ๋ง์คํฌ ์ธํ, ์ธ๊ทธ๋จผํธ ์ธํ ์ ์
|
22 |
token_inputs = tf.keras.layers.Input((SEQ_LEN,), dtype=tf.int32, name='input_word_ids')
|
23 |
mask_inputs = tf.keras.layers.Input((SEQ_LEN,), dtype=tf.int32, name='input_masks')
|
|
|
64 |
st.write("(๊ธ์ ํ๋ฅ : %.2f) ๊ธ์ ์ ์ธ ์ํ ํ๊ฐ์
๋๋ค." % predict_value)
|
65 |
|
66 |
sentiment_model = create_sentiment_bert()
|
67 |
+
movie_evaluation_predict("์ ๊ฐ๋ ๋๋ฆฌ๊ณ ์ฃผ์ธ๊ณต์ธ ์ํฌ๋ ํ๋์ปท ๋์ค๋ฉด์ ์๊ทน์ ์ธ๋ชจ์ต")
|