Coder Social home page Coder Social logo

ishmeetkaur36 / cognigaurd Goto Github PK

View Code? Open in Web Editor NEW

This project forked from 4darsh-dev/cognigaurd

0.0 0.0 0.0 8.71 MB

A web extension for identifying dark pattern on websites powered by Fine Tuned BERT Model for classificaiton on dark pattern custom dataset,

Home Page: https://cogni-gaurd.vercel.app

License: MIT License

Shell 0.09% JavaScript 3.37% Python 14.29% CSS 11.28% HTML 12.38% Jupyter Notebook 58.60%

cognigaurd's Introduction

CogniGuard ๐Ÿ•ต๏ธโ€โ™‚๏ธโœจ

Overview

CogniGuard is a powerful web extension designed to empower users by identifying and combatting dark patterns on various websites, particularly focusing on E-commerce platforms. Ensuring users a transparent and ethical online experience.

About Dark Patterns => https://www.deceptive.design/

CogniGuard

<iframe width="560" height="315" src="https://www.youtube.com/embed/1DoYa1wVWhA?si=FCnzDxHuiJs5_Q4P" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

GitHub code size GitHub contributors GitHub commit activity GitHub issues GitHub License Python Django JavaScript HTML CSS Markdown

GitHub forks GitHub Repo stars

Open Source Programs

GSSoC '24 Image **GSSoC'24** GirlScript Summer Of Code is a three-month-long Open-Source Program conducted every summer by the Girlscript Foundation. Timeline : 10th May - 10th August 2024
VSoC '24 Image **VSoC'24** Vinyasa Summer of Code is an immersive program designed to elevate your coding skills and provide hands-on experience with real-world open-source projects. Collaborate with experienced mentors, build an impressive portfolio, and become a vital part of a vibrant coding community.

Cogni-BERT Model Scores

Sweeps Training Hyperparametrs

BERT Fine-Tuned Sweep training

Project Setup Locally ๐Ÿš€

Link of Cogni-BERT Trained Model

  1. Huggingface spaces link --> https://huggingface.co/spaces/4darsh-Dev/dark_pattern_detector_app/tree/main/models

Setting up project locally

  1. clone the git repository locally.
git clone https://github.com/4darsh-Dev/CogniGaurd.git
  1. Install python and setup virtual envionment.

1. Open terminal

pip install virtualenv 
cd CogniGaurd
1. For setting django-web-app
cd django-web-app
2. For setting django-mlapi-backend
cd django-mlapi-backend

create a sample .env file in root directory (OPTIONAL)

#.env file


# Email server configuration
EMAIL_HOST=smtp.your-email-provider.com
EMAIL_HOST_USER[email protected]
EMAIL_HOST_PASSWORD=your_email_password

# database configuration or use default sqlite3 
DB_NAME=your-database-name
DB_USER=your-db-user-name
DB_PASSWORD=your-db-password
DB_HOST=your-db-host
DB_PORT=your-db-port
PJ_SECRET_KEY=your-django-project-secret-key
python -m venv myenv 

Activating virtual environment named as myenv

1. In Windows ๐ŸชŸ
.\myenv\Scripts\activate  
2. In Linux/Mac ๐Ÿง
 source myenv/bin/activate
  1. Installing required modules and libraries
 pip install -r requirements.txt 
  1. Running Django Development Server Do the following task for contributing to project and you have to revert these changes before committing These steps can be used for working on local device for contribution
In cogniguard/settings.py
# for vercel deployment 
# SECRET_KEY = os.environ.get("PJ_SECRET_KEY")
SECRET_KEY="default-development-secret-key"

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

DATABASES = {
    #  setting default sqlite3 configuration for development server
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': BASE_DIR / 'db.sqlite3',
    }
    # for vercel deployment
    # 'default': {
    #     'ENGINE': 'django.db.backends.postgresql_psycopg2',
    #     'NAME': os.environ.get("DB_NAME"),
    #     'USER': os.environ.get("DB_USER"),
    #     'PASSWORD': os.environ.get("DB_PASSWORD"),
    #     'HOST': os.environ.get("DB_HOST"),
    #     'PORT': os.environ.get("DB_PORT"),
    # }
}
In cogniguard/urls.py
# # vercel deployment configuration
# urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
# urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
python manage.py makemigrations 
python manage.py migrate 
python manage.py runserver 

-- Server will be started at localhost (example: http://127.0.0.1:8000/)

--- Warning! - Ensure to undo the development settings changes before pushing code for vercel production and PRs.

Setting up CogniGuard Web Extension

  1. Open Google Chrome Browser and visit url
 chrome://extensions/ 
  1. Turn on Developer Mode.
  2. Click on load unpacked and then select the cogniguard-web folder with manifest.json
  3. Click on extension icon and you will find the CogniGuard.
  4. Open the desired website URL (https://snapdeal.com/) on web browser and then click on Analyze button.
  5. The Analyzing process will start running on backend.

Tech Stack ๐Ÿ› ๏ธ

  • Web Extension: HTML, CSS, JavaScript
  • Python (BeautifulSoup, Scrapy): Web scraping for price data analysis.
  • Django: Backend for API management and Dark pattern report pattern for CogniGuard
  • BERT Model: Fine-tuned for sophisticated pattern recognition.

Screenshots ๐Ÿ“ธ

[Include screenshots of the extension interface in action.] coming soon.

Documentation ๐Ÿ“–

Detailed documentation on usage, contribution guidelines, and API integration can be found in the Documentation Link.

Contributors ๐Ÿง‘โ€๐Ÿ’ป

Acknowledgments ๐Ÿ™

We express our gratitude to the incredible individuals who have contributed to the development and success of CogniGuard. ๐ŸŒŸ Your dedication, passion, and insights have played a pivotal role in shaping this project.

Special thanks to the open-source community for their continuous support and collaborative spirit. ๐Ÿš€ Your contributions, whether big or small, have contributed to the growth and improvement of CogniGuard.

Feedback ๐Ÿ“ฌ

We value your feedback! Report issues at [email protected] Propose features, or submit pull requests. Let's create a fair and transparent digital environment together! ๐ŸŒโœจ

Don't forget to leave a star โญ Happy Coding!!โค๏ธ


Our Contributors

Thank you for contributing to our repository

Contributors

Show some โค๏ธ by starring this awesome repository!

cognigaurd's People

Contributors

4darsh-dev avatar amansingh494 avatar akshatpandey-2004 avatar anmolgoel29 avatar anurag6569201 avatar pradnyagaitonde avatar dharmeshtanwar56 avatar debangi29 avatar dnyandeepchute avatar goldy-dev123 avatar imgbotapp avatar mukund-gpt avatar thevijayshankersharma avatar aanchalpahuja18 avatar chaanakyaam avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.