krishnaik06 / Huggingfacetransformer

GNU General Public License v3.0
65 stars 100 forks source link

Add spam_detection.py and replace TFTrainer with Model.fit() for Tensorflow Compatibility #8

Open Nikhilltiwari opened 4 months ago

Nikhilltiwari commented 4 months ago

Summary

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

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!