This project is dedicated to the proactive prediction of potentially toxic content as users write, rather than relying on reactive classification after the entire text is submitted. The primary goal is to enhance online communication platforms, particularly in scenarios like Reddit, by identifying and addressing toxic language in real-time.
- Real-time Toxicity Prediction: The system continuously monitors user input and predicts whether the content being written is potentially toxic.
- Nudge for Rephrasing: If the toxicity confidence surpasses a predefined threshold, users are gently nudged to rephrase their text, promoting a more positive and constructive communication environment.
- Proactive Suggestions for Politeness: The solution proactively suggests users to adopt polite and kind language while they are in the process of composing text, fostering a more respectful discourse.
- Optimized for Large Texts: Particularly beneficial for platforms like Reddit, where users often compose extensive texts, the system excels in handling and monitoring substantial amounts of content in real-time.
- Clone the repository
git clone https://github.com/NOWSHAD76/Proactive-Text-Moderation.git
- Install dependencies
pip install -r requirements.txt
Create a virtual environment if required before installing
- Update config file
model_train/config.pyfor model training if required 4. Start the model training
python model_train/train.py
- Run the main.py to view the Gradio UI and test
python main.py

