Skip to content

Commit 495c0ae

Browse files
Update phishing_email_detection_gpt2.py
1 parent 8a9661f commit 495c0ae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

phishing_email_detection_gpt2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -857,7 +857,7 @@ def call(self, inputs):
857857
counter = 0
858858
for sample in non_instruct_samples:
859859
half_sample_len = int(np.ceil(len(sample)))
860-
half_sample = sample[:half_sample]
860+
half_sample = sample[:half_sample_len]
861861
half_sample_tokenized = tokenizer(half_sample)
862862
generated_tokens = generator.generate(
863863
token_ids=half_sample_tokenized,
@@ -940,7 +940,7 @@ def call(self, inputs):
940940
counter = 0
941941
for sample in non_instruct_samples:
942942
half_sample_len = int(np.ceil(len(sample)))
943-
half_sample = sample[:half_sample]
943+
half_sample = sample[:half_sample_len]
944944
half_sample_tokenized = tokenizer(half_sample)
945945
generated_tokens = reconstituted_generator.generate(
946946
token_ids=half_sample_tokenized,

0 commit comments

Comments
 (0)