This project aims at leveraging the power of AI for handling the ambiguities in the complaints submitted through the portal by detecting spam and repeated complaints. This project also helps the admin to analyse and classify the complaints on the basis of location with the help of map view classification.
Pictures
Installation
Usage
Dependencies
Endpoints
License
To run this project locally, follow these steps:
-
Install Git LFS on your system, clone the repository, run "git lfs pull" to fetch and download the actual large files tracked by Git LFS. The model.safetensors file (400 MB+) is tracked by Git LFS.
-
Install the required dependencies using pip install -r requirements.txt.
-
The nagar , gram, vikaskhand datasets are geocoded according to location. Make same changes in the corresponding SQL tables or directly use these csv files according to conveniwence. Make sure to download all datasets in .csv format only.
-
mas_aavedan.csv file will show the geographical analysis of old complaints only, because all NEW COMPLAINTS are saved in the LOCAL SQL SERVER.
-
Geographical Analysis can be done by importing real time complaint records from MYSQL SERVER instead of mas_aavedan.csv file.
-
The mas_aavedan.csv dataset saves the old complaints and don't contain spam feature. Where as all new complaints are saved in the complaints table located in the LOCAL SQL SERVER. The complaints table contains a new feature SPAM which takes values 0 or 1 according to the result of prediction of trained BERT MODEL.
Run the Flask application using python app.py. Access the application through a web browser at http://localhost:5000 or [specific URL if applicable] if deployed.
-
The geographical analysis shows the name of location on hovering over the marker. It shows the number and type of complaints from that location if clicked on the marker.
-
User can submit a complain in both english or hindi. The software will translate it to english before passing it to the trained model.
-
On submitting a complain, Output on the screen will be SUSPECTED SPAM!! if the complaint submitted was ambiguous or irrelevant.
-
Output will be SUSPECTED REPEATED! if the same complaint is registered from the same location by the person having same mobile no.
-
Output will be REGISTERED SUCCESSFULLY in all other cases.
Flask
Folium
PyMySQL
Googletrans
Pandas
Torch
Transformers
-
/ : Home page
-
/complain : User will fill a form to submit the complaint and an output statement will pop on the screen regarding weather the complaint was registered successfully or suspected spam or suspected repeated. In the first case, spam column will contain 0. In the last 2 cases, spam column in the database will have a value 1.
-
/show_status : Shows the status of all complaints registered till now.
-
/dashboard : Shows the analysis of each type of classification of complaints.
-
/geographical-analysis : Endpoint for geographical analysis on the basis of gram / nagar / vikaskhand.
IIIT - NAYA RAIPUR,
under the supervsion of Dr. Srinivas KG