Skip to content

A web application demonstrating translations and summarization with Google Gemini Nano (on-device model)

Notifications You must be signed in to change notification settings

AhsanAyaz/zubaan-gemini-nano

Repository files navigation

Zubaan - A gemini-nano based translations app

This app uses the on-device Gemini Nano model (supported in chrome 127+) for translations using both text input, and voice input as well.

Enable AI in Chrome

Chrome built-in AI is a preview feature, you need to use chrome version 127 or greater, now in dev or canary channel, may release on stable chanel at Jul 17, 2024.

After then, you should turn on these flags:

  • chrome://flags/#prompt-api-for-gemini-nano: Enabled
  • chrome://flags/#optimization-guide-on-device-model: Enabled BypassPrefRequirement
  • chrome://components/: Click Optimization Guide On Device Model to download the model.
  • Also disable the Text Safety Classifier (chrome://flags/#text-safety-classifier) flag as well

Note: The Optimization Guide On Device Model may not show up. What worked for me was opening the devtools and trying out the following:

await ai.languageModel.create();

I could see the option afterwards

You can verify by running (await window.ai.languageModel.capabilities()).available. If it says 'readily', you're all good.

About

A web application demonstrating translations and summarization with Google Gemini Nano (on-device model)

Resources

Stars

Watchers

Forks

Packages

No packages published