Skip to content

Commit

Permalink
Update phishing_email_detection_gpt2.py
Browse files Browse the repository at this point in the history
david-thrower authored Feb 22, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent a23858e commit 14c99a6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions phishing_email_detection_gpt2.py
Original file line number Diff line number Diff line change
@@ -285,8 +285,10 @@ def call(self, text):
# Load the best model (taking into account that it has a custom layer)
#
best_model_found =\
tf.keras.models.load_model(cerebros_automl.best_model_path,\
custom_objects={'GPT2Layer': GPT2Layer(max_seq_length)})
cerebros_automl.get_best_model()

# best_model_path,\
# custom_objects={'GPT2Layer': GPT2Layer(max_seq_length)})

print('Evaluating on the test dataset')
best_model_found.evaluate(X_test, y_test)

0 comments on commit 14c99a6

Please sign in to comment.