An image processing artifical intelligence PyTorch project to detect relevant ads/content for relevant Facebook groups.
A request is sent to the user for these ads to be posted to maintain a spam free platform.
Implements the Google Cloud Vision API and Facebook Groups API.
Here is a walkthrough for the application.
The user is able to log into their Facebook account using their credentials.
The user can upload an image or ad of their choice to the web app. The Google Vision API is called upon and the text from the image/ad is extracted. The machine learning model runs an inference from the frozen model to predict which type of ad/image this is.
Analyzing the user's Facebook Groups, the machine learning model runs a prediction on each group the user has access to and matches relevant groups to the type of ad or image uploaded by the user.
The user has a manual control of taking over the AI and confirming which groups they would like to post to. This is to protect their privacy and give them that user power of utilizing this web app service to their requirements and needs. The user can select which groups to post to and submit that back to the app.
The image/ad is automatically posted to the selected groups by the user from the previous steps. The user is able to effeciently share resources and content with their groups to reach large audiences for their relevant purpose.
Project completed. Will be updated here with deployment link soon.
Instructions to set up project locally on your computer:
-
Install and use python 3.8.2
-
The repository is designed as a virutal folder. It needs: pip install google pip install google-cloud-vision pip install flask pip install torch===1.4.0 torchvision===0.5.0 -f https://download.pytorch.org/whl/torch_stable.html
-
ServiceAccountToken.json file in flaskbackend for thr Google Cloud Vision API (please use your credentials)
-
Run "npm install" under the reactfrontend directory
-
Run the "NeuralNetworkModel.py" file just once (downloads dataset for "dbpedia" and saves the trained machine learning model as "model_save.pt" for effecient use in "SentimentallyPostify.py")