Skip to content

Commit 5cf1434

Browse files
Update phishing_email_detection_gpt2.py
Try inputs = tf.strings.unicode_encode(inputs, 'UTF-8') ...
1 parent 1dcc245 commit 5cf1434

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

phishing_email_detection_gpt2.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ 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')
222223
tokenized = self.tokenizer(inputs,
223224
max_length=self.max_seq_length,
224225
padding='max_length',

0 commit comments

Comments
 (0)