remrofsnart / README.md
Arunim
init
0ac9668

A newer version of the Gradio SDK is available: 6.0.1

Upgrade
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

  1. Clone this repository
  2. Create a virtual environment:
    python -m venv venv
    source venv/bin/activate  # On Windows use: venv\Scripts\activate
    
  3. Install dependencies:
    pip install -r requirements.txt
    
  4. Run the app:
    python app.py
    

Usage

  1. Enter a prompt (e.g., "And they lived happily ever after")
  2. Adjust the generation parameters if desired
  3. 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