File size: 2,344 Bytes
e875007
eff227a
 
e875007
 
 
 
 
ad689f2
e875007
eff227a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e875007
 
0ce71c2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
eff227a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
---
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