Unleashing the Power of Gemini Pro Vision: A Simple Tool for Sentiment Analysis from Instagram posts

Vishal Bulbule
Google Cloud - Community
4 min readFeb 16, 2024

Introduction

In today’s digital age, social media platforms like Instagram have become a prominent medium for expressing thoughts, ideas, and emotions. With the vast amount of content shared every second, it’s essential to harness the power of technology to understand the sentiments behind these posts. This is where this innovative tool, powered by Google’s Gemini Pro Vision API, comes into play.

Understanding the Concept

I have created a application o simplify sentiment analysis on Instagram posts. Built using Python and the Gemini Pro Vision model, it allows users to input a hashtag of their choice. The application then utilizes the Instagram Graph API to fetch the top posts associated with that hashtag. Once retrieved, the posts are analyzed using Gemini Pro Vision to extract the underlying sentiments expressed in the images and captions.

Tech Stack

This application leverages Python’s versatility to create a user-friendly interface using Streamlit. Streamlit provides an intuitive platform for building interactive web applications with minimal effort. The real magic, however, lies in Google’s Gemini Pro Vision API, a cutting-edge tool for generating content and analyzing images. By integrating these technologies, we’ve crafted a powerful yet straightforward solution for sentiment analysis on Instagram.

  • Python: Provides versatility and flexibility for building robust applications.
  • Streamlit: Creates an intuitive and user-friendly interface, making sentiment analysis accessible to everyone.
  • Instagram Graph API: Grants access to a vast ocean of Instagram content, allowing us to explore specific hashtags and their associated posts.
  • Google Gemini Pro Vision: The heart of this app, wielding its advanced AI capabilities to unlock the emotional nuances within each post.

What is Gemini Pro Vision ?

Google Gemini Pro Vision is a powerful large language model (LLM) designed for multimodal understanding and content generation. It excels at processing both text and visual information (images and videos) to offer various functionalities. Here’s a breakdown of its key features:

Capabilities:

  • Sentiment analysis: Like the application I described, Gemini Pro Vision can analyze text and images to understand the emotions conveyed, such as joy, anger, sadness, etc.
  • Content generation: Given textual prompts, the model can create different formats of creative content, including poems, code, scripts, musical pieces, email, letters, etc.
  • Visual understanding and classification: It can analyze images and videos to identify objects, scenes, activities, and attributes within them.
  • Text Summarization: Generate concise summaries of factual or fictional text, capturing key information and sentiment.
  • Question answering: Provide informative answers to questions posed in natural language, drawing information from various sources.

Key Points:

  • Multimodal: Processes both text and visual information, offering a richer understanding than text-only LLMs.
  • Generative: Creates new content based on textual prompts, fostering creative exploration.
  • Flexible: Supports various tasks like sentiment analysis, content generation, and visual understanding.
  • Google Cloud powered: Accessible through Google Cloud’s Vertex AI platform

User Experience

Using application is as simple as entering a hashtag and clicking a button. The interface is designed to be intuitive and user-friendly, making sentiment analysis accessible to everyone, regardless of technical expertise. Once the analysis is complete, users receive clear insights into the sentiments expressed in the Instagram posts associated with the chosen hashtag.

Application does not only display insight data to user but also store in BigQuery table for analysis. We can build customized dashboard to analyse overall sentiments.

Conclusion

In conclusion, This application powered by Google’s Gemini Pro Vision API represents a significant leap forward in sentiment analysis on Instagram. By combining cutting-edge technology with user-centric design, we’ve created a tool that empowers users to understand the emotions behind social media content effortlessly. With the potential to be deployed on any computing platform, this application opens new avenues for sentiment analysis in the digital age.

Explore my video demo on same implementation and try it out by yourself.

About Me

As an experienced Fully certified (11x certified) Google Cloud Architect, Google Cloud champion Innovator, with over 7+ years of expertise in Google Cloud Networking,Data ,Devops, Security and ML, I am passionate about technology and innovation. Being a Champion Innovator and Google Cloud Architect, I am always exploring new ways to leverage cloud technologies to deliver innovative solutions that make a difference.

If you have any queries or would like to get in touch, you can reach me at my email address vishal.bulbule@techtrapture.com or connect with me on LinkedIn at https://www.linkedin.com/in/vishal-bulbule/. For a more personal connection, you can also find me on Instagram at https://www.instagram.com/vishal_bulbule/?hl=en.

Additionally, please check out my YouTube Channel at https://www.youtube.com/@techtrapture for tutorials and demos on Google Cloud.

--

--