This is a full-stack web application for crime classification using machine learning, built with Django (backend) and React (frontend). One can download the model from here https://github.com/bikasaha/CYBER-CRIME-CLASSIFIER and subsequently paste it in ml_folder which is inside the backend directory as mentioned below and run the below mentioned commands to run the project
crime_classification_project/
├── backend/ # Django backend
│ ├── ml_model/ # Machine learning model files
│ ├── classification/ # Django app for ML predictions
│ └── crime_classifier/# Django project settings
│
└── frontend/ # React frontend
├── src/ # React component source code
└── public/ # Static assets
- Python 3.8+
- Node.js 14+
- pip
- npm
- Navigate to backend directory
cd backend
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
python -m spacy download en_core_web_sm
- Configure Django
python manage.py migrate
python manage.py runserver
- Navigate to frontend directory
cd frontend
npm install
npm start
- Update
SECRET_KEY
inbackend/crime_classifier/settings.py
- Adjust
CORS_ALLOWED_ORIGINS
for production deployment
- Place model files in
backend/ml_model/BEST/
- Ensure
label_mapping_WO_CV.json
is inbackend/ml_model/
- Text-based crime classification
- Machine learning inference
- Responsive web interface
- Detailed prediction probabilities
- Backend: Django, PyTorch
- Frontend: React, Tailwind CSS
- ML Libraries: Transformers, SpaCy, NLTK
- Backend: Django server
- Frontend: React development server
- Recommended: Use Gunicorn/uWSGI for production backend
- Ensure all dependencies are installed
- Check CORS settings
- Verify model file paths
- Fork the repository
- Create feature branch
- Commit changes
- Push to branch
- Create pull request
Apache License 2.0