diff --git a/interactive/interactive.json b/interactive/interactive.json index a493468..b073102 100644 --- a/interactive/interactive.json +++ b/interactive/interactive.json @@ -489,5 +489,59 @@ "placeholder": "Waiting for Gradio to start. The URL will appear here once the connection is available..." } ] + }, + { + "id": "logprobs-visualizer", + "name": "Logprobs Visualizer", + "description": "Visualize token-level logprobs and top alternatives from language models", + "github_repo_url": "https://github.com/transformerlab/transformerlab-examples", + "github_repo_dir": "logprobs-visualizer", + "resources": { + "cpus": 2, + "memory": 4 + }, + "setup": "uv pip install gradio torch transformers", + "run": "python ~/logprobs-visualizer/app.py > /tmp/gradio.log 2>&1 & sleep 3 && tail -f /tmp/gradio.log", + "envs": { + "PYTHONUNBUFFERED": "1" + }, + "env_parameters": [ + { + "field_name": "Model Name", + "env_var": "MODEL_NAME", + "field_type": "str", + "required": true, + "default": "HuggingFaceTB/SmolLM-135M", + "help_text": "HuggingFace model name (e.g. openai-community/gpt2, gpt2-medium, EleutherAI/gpt-neo-125M)" + } + ], + "icon": "https://lab.cloud/img/icons/gradio.png", + "supported_accelerators": ["cpu", "NVIDIA", "AMD"], + "_comment_ports": "Gradio UI on port 7860", + "ports": [ + { + "port": 7860, + "label": "Gradio Logprobs Visualizer", + "protocol": "http" + } + ], + "url_patterns": [ + { + "value_key": "gradio_url", + "regex": "Running on (?:local URL:\\s*)?(https?://[^\\s]+)", + "group": 1 + } + ], + "modal_title": "Logprobs Visualizer Interactive Session", + "modal_subtitle": "Access your Logprobs Visualizer through the URL below.", + "instructions": [ + { + "kind": "url", + "title": "Access Logprobs Visualizer", + "description": "Once ready, click the link below to open the Logprobs Visualizer interface. Enter a prompt to see token-level logprobs and top alternatives from the model.", + "value_key": "gradio_url", + "placeholder": "Waiting for Gradio to start. The URL will appear here once the connection is available..." + } + ] } ]