Skip to content

bqwerr/Crime-Awareness-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Logo

Crime Awareness ChatBot

User friendly Chabot Based Crime Awareness System.

Repository


Table of Contents
  1. About The Project
  2. Getting Started
  3. Contributors
  4. References

About The Project


The objective of this project is to create a chatbot that can be used to create awareness about the crimes, by fetching statistical data from the dataset. The chatbot will ask query about your problem and fetch the data based on the intents and entities recognized from the trained data. It can also help in registering compliants through chatbot. An interactive Map has been developed in the application to fetch nearby police stations and register an SOS.


  • NLTK Python library is used to tokenize words into input arrays, which are then provided as inputs to a neural network.
  • Patterns will be input arrays and tag will be as the label to train the model. Intents

Flow Diagram

Flow Diagram


Class Diagram

Class Diagram

Use Case Diagram

Use Case Diagram


Screenshots of the application

Home Page

Home

Login Page

Login

Compliant Registration

Compliant Registration

Awareness Query

Awareness

Fetching Statistics using ChatBot

Statistics

SOS Page for User

SOS

Nearby SOS Compliants

SOS

Crime Statistics

Statistics


Statistics


Built With

My Skills


Getting Started

To get a local copy of this application up and running follow these example steps.

Prerequisites

  • Python & NodeJS had to be installed in the local system.

Installation

To set up backend API, follow below steps

  1. Clone the repository

    git clone https://github.com/bqwerr/Crime-Awareness-Bot.git
  2. In the root project directory, open a terminal and create a virtual environment to install python libraries.

    cd Backend
    pip install virtualenv
    virtualenv env
    env\Scripts\activate
    
  3. Now install python libraries

    pip install -r requirements.txt
    
  4. Run the application, using below commands in sequence

    python manage.py makemigrations
    python manage.py migrate
    python manage.py runserver
    

To set up frontend application, follow below steps.

  1. In the root project directory, input below commands.
cd Frontend
npm install
npm start

Usage

  1. To get the required entities from the query provided by user, Create a Dialogflow agent and train accordingly. Then post the query to the agent using Python, to get recognized entities from the trained agent.

    • Place your project service account key in the root folder, to use dialogflow api using python.
    • Service account key can be found from google cloud console.
  2. To use MapBox API at the frontend, replace the API key with yours.

Contributors

Srujan Tumma
Sai Kiran Kammari

References