Your Name
4g
9108ddd

A newer version of the Gradio SDK is available: 6.14.0

Upgrade
metadata
title: Word Importance Evaluator
emoji: 🔬
colorFrom: yellow
colorTo: blue
sdk: gradio
sdk_version: 5.49.1
app_file: app.py
pinned: false
license: mit

Word Importance Evaluator

Drop-one embedding analysis using sentence-transformers/static-retrieval-mrl-en-v1.

Each word's importance score = the semantic distance introduced by omitting that word from the prompt (higher = more critical to the meaning).

Features

  • Importance bar chart — horizontal bars coloured by a hot→cold colormap, with a draggable threshold line
  • Distribution per word — violin-style sampled spread showing where each word's importance would land under paraphrase jitter
  • Threshold filter — highlighted HTML output and summary of words above the cutoff
  • Multi-line prompt support — all lines are concatenated into a single word list

Usage

  1. Paste a prompt (e.g. a Stable Diffusion caption)
  2. Adjust the importance threshold (default 0.30)
  3. Adjust distribution sample count if desired
  4. Click Analyse →

Files

File Purpose
app.py Full Gradio Space — core evaluator code is unchanged
requirements.txt Python dependencies