CoolFace
Apppublic

Kakaarot/Gemma-HuggingFace_TextCompletion_Demo

sourceHugging Faceupdated 1y agoView on Hugging Face
1likes
App README

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