This project is a web application for training and predicting bot detection using various machine learning models. The frontend is built with React, and the backend is built with Flask. The application allows users to upload a CSV file for training the model and then use the trained model to predict whether a user is a bot or not.
- Python 3.8 or higher
- Node.js and npm
- pip for Python package management
-
Clone the repository:
git clone https://github.com/AmeyaMprojects/IITK_HACK_2
go to the backend folder
cd IITK_HACK_2/backend -
Install the required Python packages:
pip install -r requirements.txt
-
Run the Flask application:
python app.py
-
Go to the root directory of the project IN A NEW TERNIMAL:
-
Install the required npm packages:
npm install
-
Start the React application:
npm run dev
- Open your browser and navigate to http://localhost:80.
- Upload a CSV file containing the training data. The CSV file should contain the following columns: default_profile, default_profile_image, favourites_count, followers_count, friends_count, screen_name, statuses_count, verified, geo_enabled, average_tweets_per_day, account_age_days. The CSV file that we used is given in the zip file.
- Click on the "Train Model" button to train the model.
- After the model is trained, enter user information to predict whether the user is a bot or not.
- Description: Train the model with the uploaded CSV file.
- Request: Multipart form data with a CSV file.
- Response: JSON object containing the training results and performance metrics.
- Description: Predict whether a user is a bot or not using the trained model.
- Request: JSON object containing user information.
- Response: JSON object containing the prediction result.
- If facing any errors related to network or CORS, please check if the backend server is running.
For a demonstration of the application, please watch the demo video.