Google I/O Extended Harare Merged Slides

communitiesgdgharare 309 views 44 slides Jul 12, 2024
Slide 1
Slide 1 of 44
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42
Slide 43
43
Slide 44
44

About This Presentation

The presentations by George Chakama and Michael Nyamande for the Google I/O Extended hosted by Google Developer Group Harare


Slide Content

George Chakama
Unveiling Google
Gemini: A New Era of
AI

George Chakama, a distinguished Fullstack Developer with
expertise in JavaScript, Ruby on Rails, Linux, React.js, Node.js,
and more. With a proven track record as Lead Developer at
Kerapay and Frontend Developer at Codum, George has
co-founded tech communities in Zimbabwe to help developers
network and share opportunities. He has also spoken at several
international conferences.

Passionate about integrating blockchain technology into Web3,
George is always pushing the boundaries of innovation. Known
for his generosity and creativity, he is an inspiring figure in the
tech community.

George Chakama
President
www.gtchakama.com
{/* Analysis result section */}

“Every technology shift is an
opportunity to advance scientific
discovery, accelerate human
progress, and improve lives.”
Someone from Google

What is Google Gemini
And what really makes it
so special ?
Section 1

“ Gemini is a powerful Generative artificial
intelligence (AI) model from Google.

Gen AI is a category of artificial intelligence
that can create new text, images, video,
audio, or code.”

“ Gemini is not just a Large Language Model,
but a Large Transformer Model… Its
multi-model meaning its trained alongside
words, images videos and sounds. ”

Core Strengths of Google
Gemini
Section 1

Bridges the gap between different data
types, enabling a richer understanding
of information. Imagine analyzing a
scientific research paper with text,
diagrams, and code snippets. Gemini
can process all these elements to
provide a deeper grasp of the research.
Adapts and runs efficiently on various
platforms, from powerful machines to
mobile devices. This allows developers
to integrate Gemini's capabilities into a
wider range of applications, reaching
users on different devices.
Multimodality Flexibility
Delivers exceptional results with
optimized efficiency. Gemini is not just
powerful, it's also designed for speed
and efficiency, ensuring faster
processing times and quicker responses
for real-world applications.
Performance
Core Strengths of Google Gemini
Section #

Unveiling the Potential:
Applications of Google
Gemini
Section 1

Analyzes vast datasets to uncover hidden patterns and
accelerate research breakthroughs. Imagine analyzing
years of weather data to predict future climate
patterns with greater accuracy.
Generates innovative ideas, designs, and content
across various fields. From writing poems and scripts
to creating marketing copy and designing product
concepts, Gemini can assist and inspire creative
professionals.
Creative ExplorationScientific Discovery:
Section #

Exploring Gemini in
Action: A NextJS Project
Section 1

Google Gemini Pro :
AI Image Analysis


This project is a React-based web application that
leverages Google's Generative AI (Gemini) to analyze
images from different character perspectives.
Section #

This is a scene of introspection, of quiet contemplation. The lone
figure seems lost in thought, wrestling with the weight of the world.
The image evokes a sense of solitude, of a soul grappling with the
complexities of existence. Perhaps he is a young man, struggling with
the burdens of love or ambition. Or maybe he is a seasoned soul,
weathered by time and the trials of life. In this moment, he is alone
with his thoughts, seeking solace in the vastness of the night.
This is a photo of a young man with a hood on, standing against a
clear blue sky. He's wearing a dark jacket and looks like he's
contemplating something. He looks really chill and casual. Maybe he's
about to post a new chill vibes photo on his instagram, or maybe he's
just taking a moment to enjoy the beautiful weather. Either way, he
looks like he's got it all figured out. #chillvibes #goodweather
#youngandfree

William Shakespeare George Chakama

import { GoogleGenerativeAI } from "@google/generative-ai";


// Initialize Google Generative AI with API key
const genAI = new GoogleGenerativeAI(process.env.NEXT_PUBLIC__API_GEN_API);

// State variables to manage component data
const [loading, setLoading] = useState(false);
const [apiData, setApiData] = useState("");
const [selectedFile, setSelectedFile] = useState(null);
const [selectedCharacter, setSelectedCharacter ] = useState("");
const [whoSpoke, setWhoSpoke] = useState("");

// List of characters for the dropdown selection

const characters = [
"William Shakespeare" ,
"A politician",
"A Doctor",
"A 5 year old child" ,
"A Scientist",
"an Influencer",
];

// Function to convert file to base64 for API consumption

const fileToGenerativePart = async (file) => {
const base64EncodedDataPromise = new Promise((resolve) => {
const reader = new FileReader();
reader.onloadend = () => resolve(reader.result.split(",")[1]);
reader.readAsDataURL(file);
});
return {
inlineData: { data: await base64EncodedDataPromise , mimeType:
file.type },
};
};

// Function to handle image upload and analysis
const imageUpload = async () => {
if (!selectedFile || !selectedCharacter) {
alert("Please select both an image and a character." );
return;
}
setLoading(true);
try {
const imagePart = await fileToGenerativePart (selectedFile);
const model = genAI.getGenerativeModel({ model: "gemini-1.5-flash" });
const prompt = `You receive images and explain what it is like ${selectedCharacter}.`;
const result = await model.generateContent([prompt, imagePart]);
const response = await result.response;
const text = await response.text();
setApiData(text);
} catch (error) {
console.error("Error analyzing image:" , error);
alert("An error occurred while analyzing the image. Please try again." );
} finally {
setLoading(false);
setWhoSpoke(selectedCharacter);
setSelectedCharacter (""); // Reset character selection
}
};

{/* Analysis result section */}
<div className="mt-8">
{apiData && !loading && (
<div className="bg-white p-6 rounded-lg shadow-md ">
<h2 className="text-xl font-semibold mb-4 ">{whoSpoke}
says:</h2>
<p className="text-gray-700 text-left whitespace-pre-wrap ">
{apiData}
</p>
</div>
)}
{loading && (
<p className="text-gray-500 text-center ">Analyzing image...</p>
)}
</div>

“The secret to getting
ahead is getting
started.”
Dieter Rams

@gtchakama
George Chakama tech bro
Software Developer
Thank You

Beyond the Hype: Build
Impactful AI Solutions
Speaker Name pronouns
Michael
Nyamande

●Software Developer
About Me
●Community Builder
●Technical Writer
●Author
●AI Enthusiast

●Software Developer
About Me
●Community Builder
●Technical Writer
●Author
●AI Enthusiast
Zim Tech Community

●Software Developer
About Me
●Community Builder
●Technical Writer
●Author
●AI Enthusiast

●Software Developer
About Me
●Community Builder
●Technical Writer
●Author
●AI Enthusiast

Why are we all here
though?

-ChatGPT
“There’s never been a
better time to be alive”

Generative AI is revolutionizing industries by enabling unprecedented levels of
creativity and efficiency.

●Teachers are using AI in the classroom for tailored lessons and examples.
AI tools can generate custom quizzes and provide instant feedback,
allowing for more interactive and engaging classroom experiences
● Marketers are using AI to create personalized content for different
audience segments leading to better customer engagement and higher
ROI
●Coders are using AI to be 10x more productive and write cleaner code
●Artists and musicians are using AI to create new artworks and
compositions

Generative AI is a gamechanger

How are you using
AI ?

“With great power
comes great
responsibility”
Uncle Ben

Introducing Civic
Guru

4 Billion
have unmet legal needs

This includes not being able to obtain
justice for everyday problems.

<30%
Of people in low and middle income
countries say their legal needs are met.

Get help with everyday legal queries and
concerns. Get practical advice on next
steps and remedies to your problem.
Quickly draft documents such as
Employment contracts, NDA, Affidavits,
Wills ,etc.
Assist with Legal
Queries
Help you draft
documents
Get connected with a lawyer to help you
settle your matter or get contacts for the
nearest emergency services (police,
hospital,etc)
Help you find lawyers
and emergency
services
01 02
Civic Guru
03
Civic Guru is an AI legal assistant

Civic Guru is packed with local and up to date context of
our legal documents such as the constitution, laws,
statutory instruments, by-laws, etc.

We are working with lawyers to make sure the advice
we give you is actually accurate and helpful. We are fine
tuning our model as we go.
Local Context
Section #
Laws
Constitution
Statutory
Instruments
By-laws
Legal
precedence

We have designed a simple onboarding flow that
captures key details about the user such as age,
profession, location and preferred language.

This helps the Civic Guru give better more specific
advise in a friendly and relatable language.
Personalized
Assistance
Section #

Civic Guru is able to understand voice input, making it
user friendly for the differently abled and those who
want to use it in emergency situations.

Another key decision for accessibility was putting Civic
Guru on Whatsapp instead of a app or website, giving it
easy access to Zimbabwe’s 9 million whatsapp user.
Accessibility
Section #

Beyond voice Civic Guru also understands images and
documents. This allows you to upload that contract or
take a picture of that notice, and simply ask it questions
on it, without having to type out the huge amounts of
text.
Handling Images
and Documents
Section #

Public Beta coming August

What access now?

Email me: [email protected]

Thank you : )