google-deepmind / google-deepmind/gemma

[Demo] Showcase & Feedback Request: Interactive Gemma Capabilities Demo (Gradio) on Hugging Face Spaces

Open
#227 0 comments 0 reactions 0 assignees View on GitHub
Showcase
Dominant language
Python
Stars
5.7k
Forks
1k
Avg merge
10h 33m
Merged PRs (30d)
2

Description

Hi Gemma Maintainers and Community,

I'm Akash Madisetty, and I'm excited to share an interactive demo I've built using Gradio and hosted on Hugging Face Spaces. This demo is designed to explore and showcase the versatile capabilities of the Gemma model family, leveraging Hugging Face Transformers.

The demo allows users to experiment with various generative tasks, using Gemma models (with authentication) or TinyLlama as a fallback.

You can check out the live demo here: [Demo Link](https://huggingface.co/spaces/akashmadisetty/Test)

**Core Functionality & Implemented Features:**

**Model Loading & Authentication:**

* Supports loading several Gemma instruction-tuned and base models (`google/gemma-2b-it`, `google/gemma-7b-it`, `google/gemma-2b`, `google/gemma-7b`), requiring a Hugging Face token.
* Includes `TinyLlama/TinyLlama-1.1B-Chat-v1.0` as an accessible fallback model.
* Provides user feedback during the model loading process.

**Task-Oriented Gradio Interface:**

* 📝 **Creative & Informational:** Generate diverse text formats like stories, poems, and articles, or use a fully custom prompt.
* 🧠 **Brainstorming:** Get lists of ideas across categories like projects, business needs, creative topics, etc.
* 💻 **Code Assistance:**
* **Generate:** Create code snippets for specified tasks in multiple languages.
* **Explain:** Understand provided code blocks.
* **Debug:** Identify and get explanations for potential bugs in code.
* 📚 **Comprehension:**
* **Summarize:** Generate concise summaries of input text.
* **Q&A:** Answer questions based on a given context.
* **Translate:** Translate text into various target languages.
* 🛠️ **More Tasks:** Specialized generators for common tasks:
* Content Snippets (blog outlines, social media posts)
* Email Drafting Assistance
* Text Editing & Improvement (clarity, grammar)
* Text Classification
* Simple Data Extraction
* ⚙️ **General Features:** (Moved these from under "More Tasks")
* **Generation Parameter Control:** Allows users to adjust Max New Tokens, Temperature, and Top-P to influence the model's output style and length.
* **Structured Prompting:** Utilizes helper functions to create appropriate prompts for the selected task and model type (handling instruction-following formats).
* **Error Handling:** Implements checks and provides feedback for common issues like missing tokens, model loading failures (auth, network), and generation errors (OOM, numerical instability).

**Work in Progress & Upcoming Features:**

1. Playground for Model Comparison:

Description: [e.g., I'm considering adding a feature to run the same prompt across multiple loaded models (like 2b-it vs 7b-it) side-by-side within the Gradio interface for direct comparison.]

2. Deep Dive into Model Internals:

Description: [e.g., Exploring ways to potentially visualize token probabilities or simple attention mechanisms if feasible within Gradio, to offer users a glimpse into the generation process.]

3. UI/UX Refinements:

Description: [e.g., Planning to improve the layout on smaller screens or add more examples for complex tasks.]

**Call to Action**:

I would be grateful for any feedback from the Gemma team and the wider community on this Gradio demo:

1. User Experience (UX/UI): Any suggestions for making the Gradio interface more intuitive, responsive, or user-friendly?
2. Functionality & Performance: Did you encounter any bugs, incorrect behaviour, or performance issues (especially with model loading or generation)?
3. Feature Ideas: Are there other Gemma capabilities or specific tasks you think would be valuable to demonstrate in this format?
4. Showcasing Gemma: How effectively does this demo highlight Gemma's strengths? Any ideas for better showcasing specific features (like code generation quality, instruction following, etc.)?

**Collaboration**: I'm open to collaboration or community contributions to enhance this demo further.

Thank you for creating the Gemma models and supporting the open-source AI community. I appreciate your time and look forward to any insights or suggestions you might have!

Best regards,
Akash Madisetty

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.