DAVID EAST: Hey, everyone.
Welcome to a new episode of #AskFirebase.
And my name is David East, and we didn't plan this.
SUMIT CHANDEL: And I'm Sumit Chandel, and, yes, we did.
DAVID EAST: Getting started with ML doesn't have to be hard.
Today, we're going to go over some awesome stuff
that you can do with ML Kit, like creating
custom models that classify images without any code,
generating smart replies to messages,
and identifying languages to text.
SUMIT CHANDEL: And we're not only
going to answer the questions you asked but provide
some tips of our own.
So let's get started.
[MUSIC PLAYING]
DAVID EAST: This first question is, "How do I use Kaggle and ML
Kit together?"
SUMIT CHANDEL: Well, that's a great question.
But first, in case you don't know what Kaggle is,
then you're really missing out.
Kaggle is an amazing place to go for all things machine
learning.
There's courses, competitions, and my personal favorite,
data sets.
Kaggle has a huge gallery of data sets
that are great to use for developing a machine learning
model.
This is where Kaggle works really well with ML Kit.
Kaggle has a great list of image-based data
sets, a bunch of images of rock, paper, and scissors.
And you can use a data set like this, making
sure you have the permissive license to use them,
and upload it with AutoML Vision Edge.
AutoML Vision Edge is a new feature
of ML Kit we announced at I/O this year.
You can upload labeled images, and AutoML Vision Edge
will create a classification model for you.
So if you need a custom model that
can identify if your hands are playing
a rock, a paper, or a scissors, or probably something
a little more useful, this is a really easy way of doing this.
DAVID EAST: AutoML Vision Edge has "edge"
in the name for a reason.
Edge means that the custom model you create
can be deployed to the device.
This means that you get lower latency response,
and it will work if the user loses connection.
SUMIT CHANDEL: So Kaggle is a great place to source data
sets and create powerful custom models with ML Kit.
BOTH: Rock, paper, scissors, shoot.
DAVID EAST: Next question.
SUMIT CHANDEL: So this next question comes from me.
And my question is, "Can ML Kit's Smart Reply
reply to Smart Reply?"
DAVID EAST: You're probably familiar with Smart Reply
features.
In many messaging apps nowadays, you'll
see a list of suggestions when you receive a message.
And this makes it easier to respond
because you don't have to think about what you're going to say.
And that's always good.
But ML Kit has a Smart Reply API.
You feed it a list of messages, and it will generate
those Smart Reply suggestions.
So I created a little experiment,
where I had a Smart Reply respond to a Smart Reply.
Let's see how that went.
[MUSIC PLAYING]
That was pretty awesome.
Now, this wasn't meant to be a super-intelligent response
for two reasons.
One, Smart Reply helps a user quickly
respond when they are busy, or it acts as a handy way
to initiate a longer message.
So it's not always meant to generate the exact full thing
that you would have thought to yourself.
Two, the API provides suggestions
based upon the last 10 messages in a conversation,
although it does work if only one previous message is
available.
It works better, though, when you
have real messages rather than the small, random ones,
like I was using.
So yes, Smart Reply can respond to a Smart Reply.
But you're better off using real messages.
SUMIT CHANDEL: [SPEAKING FRENCH]
DAVID EAST: Ah, next question.
The next question is, "What are some good Language ID
use cases?"
SUMIT CHANDEL: Well, to answer this question,
we need to first take a look at language ID itself.
Language ID is an API for ML Kit that
allows you to identify the language of a given
piece of text.
So if you're looking at a piece of text like this--
[SPEAKING FRENCH]
DAVID EAST: [SPEAKING FRENCH]
SUMIT CHANDEL: The Language ID API
can tell you with a high confidence that it's French.
With this information, you can do some cool things.
First of all, you can do the obvious thing--
translate the text to another language.
You can also use ML Kit to translate that text, too.
The link is in the description about that API.
But one use case that isn't obvious
is using Language ID not to translate
text but to keep track of what languages
are being used in your app.
When a user submits a comment or a chat message,
you can ID the language and save it
to a database like Firestore.
Later on, you can do analyses and see what kind of languages
users are posting to create better experiences
for those languages.
So Language ID-- it's great for translating texts.
But it's also really useful for understanding your users.
DAVID EAST: Adding machine learning to your app
doesn't require some crazy degree in mathematics.
All you have to do is use the right tools.
So that's all the tips and questions
that we have for you today.
If you want your question answered,
make sure to go to Stack Overflow, YouTube, Twitter,
and we will go and grab them and put them on this show.
SUMIT CHANDEL: And if you like this video,
make sure to like and subscribe to the channel
because we'll have a lot more like this coming out soon.
That's all for this episode of #AskFirebase.
Until then, [SPEAKING FRENCH].
DAVID EAST: Bless you.
[MUSIC PLAYING]