NextTokenPrediction / README.md
Polarium
AI Text Assistant
c76198f

A newer version of the Gradio SDK is available: 6.1.0

Upgrade
metadata
title: AI Text Assistant
emoji: πŸ€–
colorFrom: blue
colorTo: purple
sdk: gradio
sdk_version: 4.44.0
app_file: app.py
pinned: false
short_description: Generate text or summarize articles with token alternatives

πŸ€– AI Text Assistant

An interactive web application that uses AI to generate text or summarize articles, with a unique feature that shows alternative token predictions.

Features

  • Text Generation: Uses Qwen/Qwen2.5-0.5B-Instruct to continue your prompts
  • Text Summarization: Uses facebook/bart-large-cnn to summarize long articles
  • Token Alternatives: Hover over any generated word to see the top 5 alternatives the AI considered
  • Adjustable Parameters: Control max token length for generation
  • User-Friendly Interface: Simple toggle between modes with clear visual feedback

How It Works

  1. Choose between "Text Generation" or "Text Summarization" mode
  2. Enter your text (max 500 words)
  3. Adjust max tokens as needed
  4. Click "Process" to see results
  5. Hover over any word in the output to explore alternative tokens!

Technical Details

  • Models:
    • Text Generation: Qwen/Qwen2.5-0.5B-Instruct
    • Text Summarization: facebook/bart-large-cnn
  • Framework: Gradio + PyTorch + Transformers
  • Deployment: Hugging Face Spaces
  • Device: Auto-detects GPU, falls back to CPU

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference