GPT2 / README.md
kishkath's picture
Update README.md
9bb26b6 verified

A newer version of the Gradio SDK is available: 5.29.1

Upgrade
metadata
title: GPT2 Text Generator
emoji: 🔥
colorFrom: blue
colorTo: yellow
sdk: gradio
sdk_version: 5.12.0
app_file: app.py
pinned: false
license: apache-2.0
short_description: GPT2 Text generator from the prompt provided.

Shakespeare Text Generator

This is a Shakespeare-style text generator trained on Shakespeare's works. The model is based on the GPT 2 architecture and generates text in the style of Shakespeare's writings.

How to Use

  1. Enter a prompt in the text box
  2. Adjust the generation parameters if desired:
    • Max Length: Controls the maximum length of generated text
    • Temperature: Controls randomness (higher = more random)
    • Top K: Controls diversity of word choices
  3. Click "Submit" to generate text

Examples

Try some of the example prompts provided below the interface!

Model Details

This model is a small GPT model trained on Shakespeare's texts. It uses the following architecture:

  • 12 layers
  • 768 embedding dimension
  • 12 attention heads