This project leverages the Google Vision API and Latent Dirichlet Allocation (LDA) for topic modeling to analyze Instagram images. By evaluating the association between image content and user engagement, we provide data-driven recommendations to help influencers increase interaction on their posts.
-
Install required packages:
pip install google-cloud-vision gensim pandas openai matplotlib seaborn
-
Set up Google Cloud Vision API: Follow the instructions at Google Cloud Documentation to set up your API key.
-
Set up OpenAI API:
- Obtain an API key from OpenAI by creating an account and following the instructions on the OpenAI website.
- Set up your API key in your environment:
export OPENAI_API_KEY='your_api_key_here'
To run the analysis, execute the main.ipynb notebook.
- google_vision.py: Interfaces with Google Vision API to label images.
- topic_modeling.py: Performs LDA to generate and analyze topics from image labels.
- main.ipynb: Orchestrates the analysis workflow.