Skip to content

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

Open
Nikhilltiwari wants to merge 3 commits into
krishnaik06:mainfrom
Nikhilltiwari:update-tftrainer-code
Open

Add spam_detection.py and replace TFTrainer with Model.fit() for Tensorflow Compatibility#8
Nikhilltiwari wants to merge 3 commits into
krishnaik06:mainfrom
Nikhilltiwari:update-tftrainer-code

Conversation

@Nikhilltiwari

Copy link
Copy Markdown

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

  • 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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant