Back home

What It Does

LucasGPT is a text generation website built around GPT-2. A user enters a prompt, chooses settings like the number of new tokens, temperature, and whether sampling is enabled, and then the model generates a continuation of the text. The site also shows model status information and includes a simple copy button so users can easily reuse the generated output.

How I Built It

I built LucasGPT with a Python backend and a custom frontend. On the backend, I used PyTorch together with Hugging Face Transformers, specifically GPT2LMHeadModel and GPT2Tokenizer, to load GPT-2 and generate text. The app checks whether a local cached model already exists and, if not, downloads GPT-2 and saves it into a local model directory for future runs. The server exposes lightweight endpoints for checking model status and generating completions.

On the frontend, I built a custom interface with HTML, CSS, and JavaScript. The page lets users type prompts, adjust generation settings, send requests to the backend, and render the model's output in a clean text studio layout. I also added status messaging and copy-to-clipboard behavior to make the experience feel more like a real interactive writing tool.

2026