CoolFace
Apppublic

Polarium/NextTokenPrediction

sourceHugging Faceupdated 10mo agoView on Hugging Face
1likes
App README

๐Ÿค– 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. 1.Choose between "Text Generation" or "Text Summarization" mode
  2. 2.Enter your text (max 500 words)
  3. 3.Adjust max tokens as needed
  4. 4.Click "Process" to see results
  5. 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