A newer version of the Streamlit SDK is available:
1.52.1
metadata
title: Interactive Gemma Text Generation Demo
emoji: ✍️
colorFrom: indigo
colorTo: blue
sdk: streamlit
sdk_version: 1.44.1
app_file: app.py
pinned: true
short_description: Cool and Awesome initial prototype for GSOC Proposal
tags:
- text-completion
- large-language-models
- llm
- gemma-2b
- streamlit
- interactive-demo
- gsoc
- google-deepmind
- text-generation
- gemma
- streamlit
- large-language-models
- natural-language-processing
thumbnail: >-
https://cdn-uploads.huggingface.co/production/uploads/67ac255d23491001de30c71c/K2IlTBGqHbnJgYQ5a_-hX.png
Gemma Text Generator
A streamlined web application that leverages Google's Gemma-2B language model to generate text with customizable tones and parameters.
Overview
This project is a Streamlit-based web application that allows users to generate text using Google DeepMind's Gemma-2B language model. The application features an intuitive interface where users can input prompts, select different tones (Funny, Serious, or Poetic), and adjust various generation parameters to customize the output.
Features
- Text Generation: Generate text completions from user prompts
- Tone Selection: Choose from three different writing styles:
- Funny: Witty and humorous responses with unexpected twists
- Serious: Thoughtful and professional responses with logical reasoning
- Poetic: Vivid, lyrical responses with metaphors and imagery
- Customizable Parameters:
- Word count: Control the approximate length of generated text
- Temperature: Adjust the creativity and randomness
- Top-p (Nucleus Sampling): Control the diversity of outputs
- Repetition Penalty: Prevent repetitive phrases
- Word Cloud Visualization: See a visual representation of word frequency in the generated text
- One-Click Examples: Try pre-configured examples with a single click
Technology Stack
- Streamlit: Web application framework
- Hugging Face Transformers: Library for accessing pre-trained language models
- Google Gemma-2B: The underlying language model for text generation
- PyTorch: Deep learning framework
- WordCloud: Library for creating visual representations of text data
- Matplotlib: For visualizing the word cloud
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference