Spaces:
Sleeping
Sleeping
Update app.py
Browse files16 unmodified lines1718192021222340 unmodified lines6465666716 unmodified linesdef create_sentiment_bert():# ๋ฒํธ pretrained ๋ชจ๋ธ ๋ก๋model = model = TFAutoModel.from_pretrained(PATH,local_files_only=True)# ํ ํฐ ์ธํ, ๋ง์คํฌ ์ธํ, ์ธ๊ทธ๋จผํธ ์ธํ ์ ์token_inputs = tf.keras.layers.Input((SEQ_LEN,), dtype=tf.int32, name='input_word_ids')mask_inputs = tf.keras.layers.Input((SEQ_LEN,), dtype=tf.int32, name='input_masks')40 unmodified linesst.write("(๊ธ์ ํ๋ฅ : %.2f) ๊ธ์ ์ ์ธ ์ํ ํ๊ฐ์ ๋๋ค." % predict_value)sentiment_model = create_sentiment_bert()movie_evaluation_predict("๋ณด๋๊ฑฐ๋ผ ๊ณ์๋ณด๊ณ ์๋๋ฐ ์ ๊ฐ๋ ๋๋ฆฌ๊ณ ์ฃผ์ธ๊ณต์ธ ์ํฌ๋ ํ๋์ปท ๋์ค๋ฉด์ ์๊ทน์ ์ธ๋ชจ์ต์ ")16 unmodified lines1718192021222340 unmodified lines6465666716 unmodified linesdef create_sentiment_bert():# ๋ฒํธ pretrained ๋ชจ๋ธ ๋ก๋model = TFAutoModel.from_pretrained(PATH,local_files_only=True)# ํ ํฐ ์ธํ, ๋ง์คํฌ ์ธํ, ์ธ๊ทธ๋จผํธ ์ธํ ์ ์token_inputs = tf.keras.layers.Input((SEQ_LEN,), dtype=tf.int32, name='input_word_ids')mask_inputs = tf.keras.layers.Input((SEQ_LEN,), dtype=tf.int32, name='input_masks')40 unmodified linesst.write("(๊ธ์ ํ๋ฅ : %.2f) ๊ธ์ ์ ์ธ ์ํ ํ๊ฐ์ ๋๋ค." % predict_value)sentiment_model = create_sentiment_bert()movie_evaluation_predict("์ ๊ฐ๋ ๋๋ฆฌ๊ณ ์ฃผ์ธ๊ณต์ธ ์ํฌ๋ ํ๋์ปท ๋์ค๋ฉด์ ์๊ทน์ ์ธ๋ชจ์ต")
app.py+2-2