Spaces:
Sleeping
Sleeping
A newer version of the Gradio SDK is available:
6.1.0
π Quick Start Guide
Installation & Launch (3 steps)
Install dependencies:
pip install -r requirements.txtLaunch the app:
python launch.pyOpen your browser to http://localhost:7860
Alternative Launch Methods
If the above doesn't work, try these:
# Method 1: Full startup script
python run.py
# Method 2: Direct app launch
python app.py
# Method 3: With dependency installation
python run.py --install
First Time Usage
- Enter text in the input box (try: "The quick brown fox jumps over the lazy dog.")
- Select a model (default: gpt2)
- Choose model type (decoder for GPT-like, encoder for BERT-like)
- Click "Analyze"
You'll see:
- π’ Green tokens = Low perplexity (model is confident)
- π΄ Red tokens = High perplexity (model is uncertain)
Troubleshooting
Common Issues:
- "Module not found" β Run:
pip install -r requirements.txt - "Model download failed" β Check internet connection
- "Launch failed" β Try:
python launch.pyorpython app.py - Out of memory β Use smaller models like
distilgpt2ordistilbert-base-uncased
GPU Support:
- Automatically uses GPU if available
- Falls back to CPU if no GPU found
Example Models to Try
Decoder (GPT-like):
gpt2- Standard GPT-2distilgpt2- Smaller, fastermicrosoft/DialoGPT-small- Conversational
Encoder (BERT-like):
bert-base-uncased- Standard BERTdistilbert-base-uncased- Smaller, fasterroberta-base- Improved BERT
Need Help?
Run the test suite:
python test_app.py
Or try the command-line demo:
python demo.py
Still having issues? Check the full README.md for detailed instructions.
β Recent Updates
Ultra-Simplified Interface!
- Removed MLM probability slider for cleaner interface
- Removed iterations slider - single comprehensive analysis per run
- Encoder models now analyze all tokens for complete results
- Decoder models provide single-pass perplexity calculation
- Tokens are properly colored by perplexity (green=confident, red=uncertain)
- If you see black/white tokens, try refreshing the browser
- Test the colors with:
python simple_color_test.py(creates color_test.html)