This pull request adds a new script spam_detection.py and replaces the usage of TFTrainer with the Keras Model.fit() method. TFTrainer is not available in the latest versions of the transformers library, and the updated code ensures compatibility with TensorFlow.
Changes Made
Added spam_detection.py to the Huggingfacetransformer directory.
Replaced TFTrainer with Model.fit() for training the model.
Adjusted the code to use TensorFlow datasets and the Keras API.
Why These Changes
The TFTrainer class is no longer supported in the recent versions of the transformers library. This update ensures that the code remains functional and compatible with TensorFlow.
Testing
The changes have been tested locally and the model trains and evaluates correctly.
Related Issues
If there are any open issues related to this change, mention them here.
Please review the changes and let me know if any adjustments are needed. Thank you!
Summary
This pull request adds a new script
spam_detection.py
and replaces the usage ofTFTrainer
with the KerasModel.fit()
method.TFTrainer
is not available in the latest versions of thetransformers
library, and the updated code ensures compatibility with TensorFlow.Changes Made
spam_detection.py
to theHuggingfacetransformer
directory.TFTrainer
withModel.fit()
for training the model.Why These Changes
The
TFTrainer
class is no longer supported in the recent versions of thetransformers
library. This update ensures that the code remains functional and compatible with TensorFlow.Testing
The changes have been tested locally and the model trains and evaluates correctly.
Related Issues
If there are any open issues related to this change, mention them here.
Please review the changes and let me know if any adjustments are needed. Thank you!