Skip to content

Commit 96d39fe

Browse files
Update phishing_email_detection_gpt2.py
Rename legacy variables ...
1 parent 1fef6d3 commit 96d39fe

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

phishing_email_detection_gpt2.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1149,7 +1149,7 @@ def call(self, inputs):
11491149

11501150
# Process ALL original samples from data - REAL WORLD USAGE
11511151
generated_texts = []
1152-
for i, original_text in enumerate(data[:5]): # Process first 5 samples
1152+
for i, original_text in enumerate(train_samples_list_text[:5]): # Process first 5 samples
11531153
print(f"\nProcessing sample {i+1}...")
11541154

11551155
# Extract prompt part (everything up to and including </prompt>)
@@ -1217,7 +1217,7 @@ def call(self, inputs):
12171217
print("="*50)
12181218

12191219
generated_texts_all = []
1220-
for i, text in enumerate(data):
1220+
for i, text in enumerate(train_samples_list_text):
12211221
# Extract prompt part (everything up to and including </prompt>)
12221222
if '</prompt>' in text:
12231223
prompt_text = text.split('</prompt>')[0] + '</prompt>'
@@ -1260,7 +1260,7 @@ def call(self, inputs):
12601260
print("="*50)
12611261

12621262
# generated_texts_all = []
1263-
# for i, text in enumerate(data[:3]): # Process first 3 for demo
1263+
# for i, text in enumerate(train_samples_list_text[:3]): # Process first 3 for demo
12641264
# # Split such that everything before </prompt> or the entire text if </prompt> is not present
12651265
# if '</prompt>' in text:
12661266
# prompt_text = text.split('</prompt>')[0] + '</prompt>'

0 commit comments

Comments
 (0)