SergioMtz commited on
Commit
4049660
·
1 Parent(s): 3d00c67

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -11,6 +11,11 @@ with open("vocab.txt", mode = "r", encoding = "utf-8") as file:
11
  for token in file:
12
  vocab.append(token.replace("\n", ""))
13
 
 
 
 
 
 
14
  VOCAB_SIZE = len(vocab)
15
  D_MODEL = 256
16
  NB_LAYERS = 6
 
11
  for token in file:
12
  vocab.append(token.replace("\n", ""))
13
 
14
+ reserved_tokens=["[START]", "[END]", "[PAD]", "[UNK]"]
15
+
16
+ START = tf.argmax(tf.constant(reserved_tokens) == "[START]")
17
+ END = tf.argmax(tf.constant(reserved_tokens) == "[END]")
18
+ PAD = tf.argmax(tf.constant(reserved_tokens) == "[PAD]")
19
  VOCAB_SIZE = len(vocab)
20
  D_MODEL = 256
21
  NB_LAYERS = 6