/Fine_Tuning_Transformer

Fine tuned the transformer model for toxic text classification and deployed it on streamlit cloud

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

Fine_Tuning_Transformer

Fine tuned the transformer model for toxic text classification and deployed it on streamlit cloud

  • Toxic Comment Classification using Fine-tuned BERT Model

The Toxic Comment Classification project aims to develop a text classification model capable of identifying toxic comments. The project involves several key steps, including model training, evaluating accuracy, deployment on Streamlit, and pushing the model to the Hugging Face Model Hub.

  • Model Training:

The project utilizes the BERT (Bidirectional Encoder Representations from Transformers) model, which is a state-of-the-art natural language processing model. The BERT model is fine-tuned using a dataset of labeled toxic and non-toxic comments. Fine-tuning involves training the model on the labeled dataset to adapt it to the specific task of toxic comment classification.

  • Accuracy Evaluation:

After the model is trained, its accuracy is evaluated using appropriate evaluation metrics. In this project, the accuracy of the model is reported to be 97% based on the evaluation on a validation or test dataset. Other evaluation metrics, such as precision, recall, and F1 score, may also be considered to assess the model's performance.

  • Deployment on Streamlit:

The trained model is deployed using the Streamlit framework, which allows for the creation of interactive web applications. Streamlit provides a user-friendly interface where users can input text and receive predictions on whether the comment is toxic or non-toxic. The deployed web application enhances accessibility and enables users to interact with the model easily. Pushing the Model to the Hugging Face Model Hub:

The final trained model can be shared with the broader community by pushing it to the Hugging Face Model Hub. The Hugging Face Model Hub is a platform that hosts a wide range of pre-trained models and allows users to discover, share, and use models in various NLP tasks. By pushing the model to the Hugging Face Model Hub, other researchers, developers, and NLP enthusiasts can access and utilize the model for their own projects. The Toxic Comment Classification project demonstrates the process of training a BERT-based model for toxic comment classification, evaluating its accuracy, deploying it on Streamlit for interactive use, and sharing the model with the community through the Hugging Face Model Hub. This project contributes to the development of effective tools for identifying and addressing toxic comments in various online platforms and social media channels.