Skip to content

Commit dc4dcc6

Browse files
Update phishing_email_detection_gpt2.py
...
1 parent 5ce1eb8 commit dc4dcc6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

phishing_email_detection_gpt2.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,9 @@ def call(self, inputs):
219219
# inputs = inputs.numpy().astype("U").tolist()
220220

221221
# inputs = [x.decode('utf-8') for x in inputs]
222-
inputs = tf.strings.unicode_encode(inputs, 'UTF-8')
223-
tokenized = self.tokenizer(inputs,
222+
# inputs = tf.strings.unicode_encode(inputs, 'UTF-8')
223+
224+
tokenized = self.tokenizer(inputs.numpy().astype("U").tolist(),
224225
max_length=self.max_seq_length,
225226
padding='max_length',
226227
truncation=True,

0 commit comments

Comments
 (0)