duwing commited on
Commit
404f618
ยท
verified ยท
1 Parent(s): 20491a1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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 = 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,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("์ „๊ฐœ๋„ ๋А๋ฆฌ๊ณ  ์ฃผ์ธ๊ณต์ธ ์€ํฌ๋Š” ํ•œ๋‘์ปท ๋‚˜์˜ค๋ฉด์„œ ์†Œ๊ทน์ ์ธ๋ชจ์Šต")