kaixinwang commited on
Commit
94e8426
·
1 Parent(s): 0ed8f63

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -12,7 +12,7 @@ tokenizer = DistilBertTokenizer.from_pretrained(MODEL_NAME_1)
12
  x = st.text_input("Type in your review here:")
13
  st.write("Your review is:", x)
14
  encoding = tokenizer(x, truncation=True, padding=True)
15
- encoded = tf.data.Dataset.from_tensor_slices((dict(encoding), 1)
16
  preds = model.predict(encoded.batch(1)).logits
17
  prob = tf.nn.softmax(preds, axis=1).numpy()
18
  prob_max = np.argmax(prob, axis=1)
 
12
  x = st.text_input("Type in your review here:")
13
  st.write("Your review is:", x)
14
  encoding = tokenizer(x, truncation=True, padding=True)
15
+ encoded = tf.data.Dataset.from_tensor_slices((dict(encoding), 1))
16
  preds = model.predict(encoded.batch(1)).logits
17
  prob = tf.nn.softmax(preds, axis=1).numpy()
18
  prob_max = np.argmax(prob, axis=1)