Spaces:
Paused
Paused
Download templates/inference.html from igardner/StockAnalysis: direct link, hf CLI and curl.
- Browser
- Download file 3.16 kB
-
https://huggingface.co/spaces/igardner/StockAnalysis/resolve/main/templates/inference.html
- Command line
-
hf download hf://spaces/igardner/StockAnalysis/templates/inference.html
-
curl -L -o inference.html https://huggingface.co/spaces/igardner/StockAnalysis/resolve/main/templates/inference.html
3.16 kB
| {% extends "base.html" %} | |
| {% block title %}Inference · cuddly happy game platform{% endblock %} | |
| {% block content %} | |
| <section class="hero fade-up"> | |
| <p class="eyebrow">kept for fun · original smoke test</p> | |
| <h1 class="display inference-title">Ping the models.<br><em>See what answers.</em></h1> | |
| <p class="lede">The original Hugging Face inference smoke test lives here. It asks a handful of trending conversational models a one-word prompt and records which ones reply.</p> | |
| </section> | |
| <div class="grid g-2 fade-up d1"> | |
| <section class="panel"> | |
| <div class="panel-head"><span class="panel-title">Token</span></div> | |
| <div class="panel-body stack"> | |
| {% if status %} | |
| <div class="stat"> | |
| <span class="k">state</span> | |
| <span class="v">{{ 'ok' if status.ok else 'not set' }}</span> | |
| </div> | |
| {% if status.name %} | |
| <div class="stat"><span class="k">account</span><span class="v">{{ status.name }}</span></div> | |
| {% endif %} | |
| {% if status.plan %} | |
| <div class="stat"><span class="k">plan</span><span class="v">{{ status.plan }}</span></div> | |
| {% endif %} | |
| {% if status.error %} | |
| <p class="faint" style="font-size:12.5px">{{ status.error }}</p> | |
| {% endif %} | |
| {% else %} | |
| <p class="faint" style="font-size:12.5px">{{ error or 'Inference module unavailable.' }}</p> | |
| {% endif %} | |
| <form action="/inference/run" method="POST" class="row" style="margin-top:6px"> | |
| <label class="visually-hidden" for="model-limit">Number of models to test</label> | |
| <input class="field model-limit" id="model-limit" type="number" name="limit" value="3" min="1" max="10"> | |
| <button class="btn btn-primary" type="submit">Run smoke test</button> | |
| </form> | |
| <p class="faint" style="font-size:11.5px">Needs an <span class="mono">HF_TOKEN</span> secret. Results persist to the Space's data volume.</p> | |
| </div> | |
| </section> | |
| <section class="panel"> | |
| <div class="panel-head"><span class="panel-title">Latest run</span></div> | |
| <div class="panel-body stack"> | |
| {% set run = result or latest %} | |
| {% if run %} | |
| <div class="row" style="gap:22px"> | |
| <div class="stat"><span class="k">passed</span><span class="v">{{ run.passed }}</span></div> | |
| <div class="stat"><span class="k">failed</span><span class="v">{{ run.failed }}</span></div> | |
| <div class="stat"><span class="k">duration</span><span class="v">{{ run.duration_seconds }}s</span></div> | |
| </div> | |
| <hr class="divider"> | |
| <div class="stack-8" role="status" aria-live="polite"> | |
| {% for r in run.results %} | |
| <div class="row-between" style="font-size:13px"> | |
| <span class="mono">{{ r.model_id }}</span> | |
| <span class="{{ 'mono' }}" style="color: {{ '#6fcf97' if r.ok else '#e06c75' }}">{{ 'ok' if r.ok else 'fail' }}</span> | |
| </div> | |
| {% endfor %} | |
| </div> | |
| {% else %} | |
| <p class="faint" style="font-size:13px">No runs yet.</p> | |
| {% endif %} | |
| {% if error %} | |
| <p class="faint" style="font-size:12px; color:#e06c75">{{ error }}</p> | |
| {% endif %} | |
| </div> | |
| </section> | |
| </div> | |
| {% endblock %} | |