Getting Started with
Gemini Pro
Overview
Gemini is the first model to outperform human experts on
MMLU (Massive Multitask Language Understanding), one of
the most popular methods to test the knowledge and
problem solving abilities of AI models.
largeIMAGEmodel
largelanguagemodel
Already started rolling out Gemini in our products: Gemini
Nano is in Android, starting with Pixel 8 Pro, and a
specifically tuned version of Gemini Pro is in Bard.
Gemini Pro available for developers and enterprises to build
for your own use cases
Pricing:-
How can we Use Gemini Pro
The first version of Gemini Pro is now accessible via
the Gemini API and here’s more about it
● Gemini Pro outperforms other similarly-sized models on
research benchmarks.
● Today’s version comes with a 32K context window for
text, and future versions will have a larger context
window.
● It’s free to use right now, within limits, and it will
be competitively priced.
● It comes with a range of features: function calling,
embeddings, semantic retrieval and custom knowledge
grounding, and chat functionality.
● It supports 38 languages across 180+ countries and
territories worldwide.
● In today’s release, Gemini Pro accepts text as input and
generates text as output. We’ve also made a dedicated
Gemini Pro Vision multimodal endpoint available today
that accepts text and imagery as input, with text output.
● SDKs are available for Gemini Pro to help you build apps
that run anywhere. Python, Android
(Kotlin), Node.js, Swift and JavaScript are all supported.
Requirements:-
● streamlit
● google-generativeai
● python-dotenv
Project 1
Google API:-
Get API key | Google AI Studio
Code:-
Project 1
from dotenv import load_dotenv
load_dotenv()
import streamlit as st
import google.generativeai as genai
import os
genai.configure(api_key=os.getenv("GOOGLE_API"))
model = genai.GenerativeModel('gemini-pro')
def get_gemini_response(question):
response = model.generate_content(question)
return response.text
def main():
st.title("Gemini chat App")
# Get user input
user_input = st.text_input("Enter something:",key="input")
# Display the user input
st.write("You entered:", user_input)
submit = st.button("Submit")
# Check if the submit button is pressed
if submit:
# Respond when the button is pressed
response = get_gemini_response(user_input)
st.subheader("The Response is: ")
st.write(response)
if __name__ == "__main__":
main()
Thank You

geminipro (google developer student clubs Haldia Institute of Technology 2023 to 2024).pptx

  • 1.
  • 2.
    Overview Gemini is thefirst model to outperform human experts on MMLU (Massive Multitask Language Understanding), one of the most popular methods to test the knowledge and problem solving abilities of AI models. largeIMAGEmodel largelanguagemodel
  • 3.
    Already started rollingout Gemini in our products: Gemini Nano is in Android, starting with Pixel 8 Pro, and a specifically tuned version of Gemini Pro is in Bard. Gemini Pro available for developers and enterprises to build for your own use cases
  • 5.
  • 6.
    How can weUse Gemini Pro The first version of Gemini Pro is now accessible via the Gemini API and here’s more about it ● Gemini Pro outperforms other similarly-sized models on research benchmarks. ● Today’s version comes with a 32K context window for text, and future versions will have a larger context window. ● It’s free to use right now, within limits, and it will be competitively priced.
  • 7.
    ● It comeswith a range of features: function calling, embeddings, semantic retrieval and custom knowledge grounding, and chat functionality. ● It supports 38 languages across 180+ countries and territories worldwide. ● In today’s release, Gemini Pro accepts text as input and generates text as output. We’ve also made a dedicated Gemini Pro Vision multimodal endpoint available today that accepts text and imagery as input, with text output. ● SDKs are available for Gemini Pro to help you build apps that run anywhere. Python, Android (Kotlin), Node.js, Swift and JavaScript are all supported.
  • 8.
    Requirements:- ● streamlit ● google-generativeai ●python-dotenv Project 1 Google API:- Get API key | Google AI Studio
  • 9.
    Code:- Project 1 from dotenvimport load_dotenv load_dotenv() import streamlit as st import google.generativeai as genai import os genai.configure(api_key=os.getenv("GOOGLE_API")) model = genai.GenerativeModel('gemini-pro') def get_gemini_response(question): response = model.generate_content(question) return response.text def main(): st.title("Gemini chat App") # Get user input user_input = st.text_input("Enter something:",key="input") # Display the user input st.write("You entered:", user_input) submit = st.button("Submit") # Check if the submit button is pressed if submit: # Respond when the button is pressed response = get_gemini_response(user_input) st.subheader("The Response is: ") st.write(response) if __name__ == "__main__": main()
  • 10.