Skip to content

This repository contains a Streamlit app that leverages GPT2 model for text generation. With an intuitive interface, users can enter a prompt and adjust parameters to explore different styles of AI-generated text.

Notifications You must be signed in to change notification settings

dlopezyse/text-generation-gpt2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

🤖 Text Generation with GPT2

A simple Streamlit app for generating text using GPT2 model. Users can input a prompt and fine-tune generation parameters such as max length, temperature, top-k, top-p, and repetition penalty.

🔹 Features

✅ Customizable text generation with GPT2
✅ Adjustable sampling parameters for creative control
✅ Generates multiple output sequences

🛠️ How It Works

The app loads the pre-trained GPT2 model and tokenizer. Users enter a text prompt. Various parameters can be adjusted via the sidebar. The app generates text based on the input and selected settings.

🖥️ Environment

The project was developed using Visual Studio Code 1.97 with Python 3.9.21

👨‍💻 Try it out and tweak the settings to explore different text generation styles!

📢 Let's connect! LinkedIn | X | Medium

About

This repository contains a Streamlit app that leverages GPT2 model for text generation. With an intuitive interface, users can enter a prompt and adjust parameters to explore different styles of AI-generated text.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages