Spaces:
Running
Running
<html> | |
<head> | |
<title>LLM Token Visualization</title> | |
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}"> | |
<script src="https://unpkg.com/@popperjs/core@2"></script> | |
<script src="https://unpkg.com/tippy.js@6"></script> | |
<link rel="stylesheet" href="https://unpkg.com/tippy.js@6/themes/light.css"> | |
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap" rel="stylesheet"> | |
</head> | |
<body> | |
<div class="container"> | |
<header> | |
<h1>LLM Token Visualization</h1> | |
<p class="subtitle">Analyze how language models process and predict text</p> | |
</header> | |
<div class="control-panel"> | |
<div class="input-group"> | |
<label for="model-select">Model:</label> | |
<select id="model-select" class="styled-select"> | |
{% for model in models %} | |
<option value="{{ model }}">{{ model }}</option> | |
{% endfor %} | |
</select> | |
</div> | |
<div class="input-group"> | |
<label for="input-text">Text to Analyze:</label> | |
<textarea id="input-text" placeholder="Enter your text here..."></textarea> | |
</div> | |
<button id="analyze-button" class="primary-button"> | |
<span class="button-text">Analyze</span> | |
<div class="button-spinner hidden"></div> | |
</button> | |
</div> | |
<div id="output" class="output-panel"> | |
<div class="output-section"> | |
<h2>Token Analysis</h2> | |
<div id="colored-text" class="token-display"></div> | |
</div> | |
<div class="stats-section"> | |
<h2>Statistics</h2> | |
<div class="stats-grid"> | |
<div class="stat-card"> | |
<div class="stat-label">Joint Log-Likelihood</div> | |
<div class="stat-value" id="joint-log-likelihood">-</div> | |
</div> | |
<div class="stat-card"> | |
<div class="stat-label">Average Log-Likelihood</div> | |
<div class="stat-value" id="average-log-likelihood">-</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
<script src="{{ url_for('static', filename='script.js') }}"></script> | |
</body> | |
</html> |