Spaces:
Sleeping
Sleeping
A newer version of the Gradio SDK is available:
6.0.1
metadata
title: Remrofsnart
emoji: π
colorFrom: yellow
colorTo: blue
sdk: gradio
sdk_version: 5.34.0
app_file: app.py
pinned: false
license: mit
short_description: previous token predictor
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
Reverse GPT-2 Generator
This is a Gradio app that uses a reverse-trained GPT-2 model to generate text that would logically come before a given prompt.
Features
- Generate text that comes before your prompt
- Adjustable parameters:
- Max tokens
- Temperature
- Top-k sampling
- User-friendly interface
- Real-time generation
Local Development
- Clone this repository
- Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows use: venv\Scripts\activate - Install dependencies:
pip install -r requirements.txt - Run the app:
python app.py
Usage
- Enter a prompt (e.g., "And they lived happily ever after")
- Adjust the generation parameters if desired
- Click Submit to generate text
Model
The app uses a reverse-trained GPT-2 model hosted on HuggingFace. The model is automatically downloaded when the app starts.
License
MIT