This repo is a public archive now, further development will be done on new repo nirodh.
The Cyberbullying Detection API is a fast and efficient tool for detecting instances of cyberbullying in text. It provides a simple endpoint /analyse
where you can submit text, and it will respond with a classification indicating whether cyberbullying is detected and the type of cyberbullying if applicable.
This is the main endpoint of the API for analyzing text data for cyberbullying. Users can post a JSON object with the text they want to analyze.
HTTP Method: POST
Request Format:
{
"text": "Women are meant in kitchen."
}
Response Format:
{
"status": 1,
"message": "Cyberbullying on the basis of gender is detected.",
"label": "gender"
}
- Clone the Repository:
git clone <repository-url>
- Install Dependencies:
pip install -r requirements.txt
- Run the API:
uvicorn main:app --host 0.0.0.0 --port 8000 --reload
- Make POST Requests:
- Send a POST request to
http://localhost:8000/analyse
with the JSON payload containing the text you want to analyze.
The API response will contain the following fields:
- status: An integer indicating the status of the analysis.
1
indicates cyberbullying is detected,0
means no cyberbullying is detected. - message: A message describing the analysis result.
- label: If cyberbullying is detected, this field specifies the type of cyberbullying detected.
-
Data Logging and Feedback Mechanism: Implement a data logging system and a feedback mechanism to collect user-generated data and feedback for model refinement (as discussed earlier).
-
Image Analysis: Extend the API to support image analysis for detecting cyberbullying in images. Users should be able to submit images for analysis.
-
Multilingual Support: Add support for multiple languages to make the API more versatile and accessible.
-
User Authentication: Implement user authentication to track and analyze usage patterns, which can help improve the service over time.
-
Model Fine-tuning: Continuously update and fine-tune the model with new data to enhance its accuracy and effectiveness.
-
Documentation: Expand and improve the API documentation to make it more user-friendly and informative.
-
Scalability: Ensure the API can handle a growing number of requests by optimizing its performance and potentially deploying it on a scalable infrastructure.