This project was generated with Angular CLI version 16.0.2.
Run ng serve for a dev server. Navigate to http://localhost:4200/. The application will automatically reload if you change any of the source files.
Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.
Run ng build to build the project. The build artifacts will be stored in the dist/ directory.
Run ng test to execute the unit tests via Karma.
Run ng e2e to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
To get more help on the Angular CLI use ng help or go check out the Angular CLI Overview and Command Reference page.
This Python script performs web scraping on a given web page, extracts the text content, and detects gender-biased sentences using a list of gender-biased words. It also extracts alt texts from images on the web page and performs gender detection on the images using a pre-trained deep learning model.
- Python 3.x
- requests
- beautifulsoup4
- pillow
- pytesseract
- tesseract
- pandas
- numpy
- cv2
- imghdr
- deepface
- Install the required dependencies listed above.
- Download the gender_biased_words.xlsx file and place it in the same directory as the script.
- Run the script using the command
python web_scraping_gender_detection.py. - Enter the URL of the web page when prompted.
- The script will perform web scraping, extract text content, detect gender-biased sentences, and provide the results.
Note: The script assumes the presence of the gender_biased_words.xlsx file in the same directory. Make sure to download and place it in the correct location.
Example 1:
Enter the URL of the webpage: https://www.example.com
Gender-biased sentences found in the text content:
1. The man was the CEO of the company.
2. She is a nurse.
Gender detection results for images:
Image URL: https://www.example.com/image1.jpg
Gender: Male
Image URL: https://www.example.com/image2.jpg
Gender: Female
Example 2:
Enter the URL of the webpage: https://www.example.com/blog
No gender-biased sentences found in the text content.
Gender detection results for images:
Image URL: https://www.example.com/image3.jpg
Gender: Male -0 ,Female -3
Image is Gender-biased
Image URL: https://www.example.com/image4.jpg
Gender: Male -5 , Female-0
Image is Gender-biased
Note: The gender detection results for images are based on a pre-trained deep learning model and may not be accurate in all cases.
This project is licensed under the MIT License.