Skip to content

Commit b365555

Browse files
Update phishing_email_detection_gpt2.py
Parameterize SAMPLES_TO_CREATE.
1 parent fe7cd57 commit b365555

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

phishing_email_detection_gpt2.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@
2323
from os.path import getsize
2424
import re
2525

26+
27+
# Number of text samples to create:
28+
29+
SAMPLES_TO_CREATE = 10 # Number of text samples (of approximately max_seq_len) to create
30+
2631
# Text encoding / embedding related constants
2732

2833

@@ -231,7 +236,7 @@ def package_non_instruct_text(text: str, desired_samples: int, max_length_tokens
231236
return samples
232237

233238
# Separate into samples
234-
non_instruct_samples = package_non_instruct_text(text=bible, desired_samples=10, max_length_tokens=int(np.ceil(MAX_SEQ_LENGTH * .8))) ##
239+
non_instruct_samples = package_non_instruct_text(text=bible, desired_samples=SAMPLES_TO_CREATE, max_length_tokens=int(np.ceil(MAX_SEQ_LENGTH * .8))) ##
235240

236241
del(bible)
237242
collect()

0 commit comments

Comments
 (0)