Detect Cyber Harassment using Machine Learning.
- Create virtual Environment
python3 -m venv venv
source venv/bin/activatepip install -e ".[dev]"-
Download the ML model from Jigsaw-toxic-comment-detect.ipynb and paste inside models folder.
-
Run the application
flask runWeb app will start where user can input the text. The prediction label will be shown to the user after prediction.
We can test the prediction using curl command :
curl -X POST http://localhost:5000/predict -H "Content-Type: application/json" \
-d '{"comment_text": "I hate you as a person."}'
This can be done via postman POST request call on http://localhost:5000/predict with payload:
{
"comment_text": "I hate you as a person."
}
