Skip to content

Conversation

@supermoos
Copy link

Improve setup instructions and add runtime warnings

This commit enhances the user and developer experience for the Emoji Gemma web demos by providing clearer setup instructions and adding important warnings about runtime requirements.

Key changes include:

  • Updated READMEs with instructions for setting up an HTTPS server, which is necessary for WebGPU on some platforms (e.g., iOS Safari).
  • Added a "Device Limitations" section to the READMEs to warn users about high memory usage and potential crashes on mobile devices.
  • Improved the WebGPU availability check in the app-mediapipe demo to detect and notify users when running in a non-secure context.

@google-cla
Copy link

google-cla bot commented Nov 5, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@gemini-code-assist
Copy link

Summary of Changes

Hello @supermoos, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the user experience for the Emoji Gemma web demos by providing clearer setup instructions, adding warnings about device limitations and HTTPS requirements, and improving error handling for WebGPU availability. These changes make the demos more accessible and robust across different platforms and devices.

Highlights

  • Improved Setup Instructions: The README files for both the app-mediapipe and app-transformersjs demos have been updated with more detailed instructions for setting up a local web server, including guidance on creating a secure (HTTPS) server, which is required for WebGPU on some platforms like iOS Safari.
  • Device Limitations Warning: A new "Device Limitations" section has been added to the README files to warn users about the high memory usage of language models and the potential for crashes on memory-constrained devices, especially iOS devices.
  • WebGPU Availability Check: The app-mediapipe demo now includes an improved WebGPU availability check that detects and notifies users when running in a non-secure context (HTTP), advising them to use HTTPS.
  • Preload Worker Resource: The index.html file in app-mediapipe has been updated to properly preload the worker script.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request significantly improves the user experience by adding detailed setup instructions for running a secure HTTPS server, which is a requirement for WebGPU on some platforms. It also adds important warnings about device memory limitations and enhances the WebGPU availability check to inform users about running in a non-secure context. The changes are clear and valuable. I've suggested a couple of minor improvements to the documentation and fixed a typo in a warning message.

Comment on lines +12 to +14
```bash
openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -sha256 -days 365 -nodes -subj "/C=US/ST=CA/L=Mountain View/O=Dev/CN=localhost"
```

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The openssl command includes a very specific subject. While this works, a simpler subject focusing only on the Common Name (CN) is sufficient for a local development certificate and is less confusing for users who might think they need to change these values.

Suggested change
```bash
openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -sha256 -days 365 -nodes -subj "/C=US/ST=CA/L=Mountain View/O=Dev/CN=localhost"
```
```bash
openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -sha256 -days 365 -nodes -subj "/CN=localhost"
```

Comment on lines +36 to +39
message += `
<br/><br/>
<strong>Note:</strong> WebGPU requires a secure context. Please access this page over HTTPS or from 'localhost'. Accessing a local server via its IP address also requires an HTTPS setup in many instances (e.g. iOS26 Safari).
`;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

There appears to be a typo "iOS26" in the note. It's better to either correct it to a specific version or make it more general, like 'iOS Safari', to avoid it becoming outdated.

Suggested change
message += `
<br/><br/>
<strong>Note:</strong> WebGPU requires a secure context. Please access this page over HTTPS or from 'localhost'. Accessing a local server via its IP address also requires an HTTPS setup in many instances (e.g. iOS26 Safari).
`;
message += `
<br/><br/>
<strong>Note:</strong> WebGPU requires a secure context. Please access this page over HTTPS or from 'localhost'. Accessing a local server via its IP address also requires an HTTPS setup in many instances (e.g. iOS Safari).
`;

Comment on lines +13 to +15
```bash
openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -sha256 -days 365 -nodes -subj "/C=US/ST=CA/L=Mountain View/O=Dev/CN=localhost"
```

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The openssl command includes a very specific subject. While this works, a simpler subject focusing only on the Common Name (CN) is sufficient for a local development certificate and is less confusing for users who might think they need to change these values.

Suggested change
```bash
openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -sha256 -days 365 -nodes -subj "/C=US/ST=CA/L=Mountain View/O=Dev/CN=localhost"
```
```bash
openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -sha256 -days 365 -nodes -subj "/CN=localhost"
```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants