Spaces:
Sleeping
Sleeping
Claude commited on
Commit ·
2fde543
1
Parent(s): edad228
Promote API key field above the preview buttons
Browse filesTopic-scene preview requires an Anthropic API key but the field was
buried in section 2 (AI assist), below the preview buttons that
need it. Users hit the disabled "Preview topic scenes" button with
no obvious next step.
Move the API key field into section 1 between Transcript and the
preview buttons, so by the time the user looks at the buttons all
three prerequisites are visible above them. Section 2 now only
holds the per-feature LLM toggles; its intro updated to reference
the API key field above.
- app/templates/index.html +32 -22
app/templates/index.html
CHANGED
|
@@ -179,6 +179,13 @@
|
|
| 179 |
.vgm-field:last-child { margin-bottom: 0; }
|
| 180 |
.vgm-field label { font-weight: 600; font-size: 0.92rem; }
|
| 181 |
.vgm-field small { font-size: 0.82rem; color: var(--color-text-muted); }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 182 |
.vgm-card input[type="text"],
|
| 183 |
.vgm-card input[type="password"] {
|
| 184 |
font-family: inherit;
|
|
@@ -748,6 +755,29 @@
|
|
| 748 |
</div>
|
| 749 |
<div class="vgm-drop__meta" data-meta-for="video"></div>
|
| 750 |
</label>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 751 |
<div class="vgm-preview-btn-row">
|
| 752 |
<button type="button" id="preview-btn" class="vgm-preview-btn" disabled>
|
| 753 |
Preview scenes
|
|
@@ -756,7 +786,7 @@
|
|
| 756 |
Preview topic scenes
|
| 757 |
</button>
|
| 758 |
</div>
|
| 759 |
-
<p class="vgm-preview-hint">Recommended — pick which slides (or topics) to include before generating. Topic preview
|
| 760 |
<div class="vgm-preview-status" id="preview-status" aria-live="polite"></div>
|
| 761 |
<div class="vgm-preview-bar" id="preview-bar" aria-hidden="true"></div>
|
| 762 |
</div>
|
|
@@ -776,34 +806,14 @@
|
|
| 776 |
<input type="hidden" name="preview_token" id="preview-token-input">
|
| 777 |
<input type="hidden" name="selected_indices" id="selected-indices-input">
|
| 778 |
</div>
|
| 779 |
-
|
| 780 |
-
<div class="vgm-field">
|
| 781 |
-
<label for="transcript">Transcript</label>
|
| 782 |
-
<label class="vgm-drop" data-loaded="false">
|
| 783 |
-
<input type="file" id="transcript" name="transcript" accept=".vtt,.srt,text/vtt,application/x-subrip" required>
|
| 784 |
-
<div class="vgm-drop__hint">
|
| 785 |
-
<strong>Drop a VTT or SRT file</strong> or click to browse<br>
|
| 786 |
-
<small>Cue timestamps drive segment alignment</small>
|
| 787 |
-
</div>
|
| 788 |
-
<div class="vgm-drop__meta" data-meta-for="transcript"></div>
|
| 789 |
-
</label>
|
| 790 |
-
</div>
|
| 791 |
</div>
|
| 792 |
|
| 793 |
<div class="vgm-section">
|
| 794 |
<h3 class="vgm-section__title">2. AI assist (optional)</h3>
|
| 795 |
<p class="vgm-section__intro">
|
| 796 |
-
|
| 797 |
</p>
|
| 798 |
|
| 799 |
-
<div class="vgm-field">
|
| 800 |
-
<label for="anthropic_api_key">Anthropic API key</label>
|
| 801 |
-
<input type="password" id="anthropic_api_key" name="anthropic_api_key"
|
| 802 |
-
autocomplete="off" spellcheck="false"
|
| 803 |
-
placeholder="sk-ant-…">
|
| 804 |
-
<small>Used once for this run. Sent over HTTPS, held in memory only, never written to disk or logs.</small>
|
| 805 |
-
</div>
|
| 806 |
-
|
| 807 |
<div class="vgm-llm-grid">
|
| 808 |
<label class="vgm-llm-toggle">
|
| 809 |
<input type="checkbox" name="llm_section_title" value="true">
|
|
|
|
| 179 |
.vgm-field:last-child { margin-bottom: 0; }
|
| 180 |
.vgm-field label { font-weight: 600; font-size: 0.92rem; }
|
| 181 |
.vgm-field small { font-size: 0.82rem; color: var(--color-text-muted); }
|
| 182 |
+
.vgm-field__optional {
|
| 183 |
+
font-weight: 400;
|
| 184 |
+
font-size: 0.82rem;
|
| 185 |
+
color: var(--color-text-muted);
|
| 186 |
+
margin-left: 0.3rem;
|
| 187 |
+
}
|
| 188 |
+
.vgm-field--preview { margin-top: -0.4rem; }
|
| 189 |
.vgm-card input[type="text"],
|
| 190 |
.vgm-card input[type="password"] {
|
| 191 |
font-family: inherit;
|
|
|
|
| 755 |
</div>
|
| 756 |
<div class="vgm-drop__meta" data-meta-for="video"></div>
|
| 757 |
</label>
|
| 758 |
+
</div>
|
| 759 |
+
|
| 760 |
+
<div class="vgm-field">
|
| 761 |
+
<label for="transcript">Transcript</label>
|
| 762 |
+
<label class="vgm-drop" data-loaded="false">
|
| 763 |
+
<input type="file" id="transcript" name="transcript" accept=".vtt,.srt,text/vtt,application/x-subrip" required>
|
| 764 |
+
<div class="vgm-drop__hint">
|
| 765 |
+
<strong>Drop a VTT or SRT file</strong> or click to browse<br>
|
| 766 |
+
<small>Cue timestamps drive segment alignment</small>
|
| 767 |
+
</div>
|
| 768 |
+
<div class="vgm-drop__meta" data-meta-for="transcript"></div>
|
| 769 |
+
</label>
|
| 770 |
+
</div>
|
| 771 |
+
|
| 772 |
+
<div class="vgm-field">
|
| 773 |
+
<label for="anthropic_api_key">Anthropic API key <span class="vgm-field__optional">(optional, enables AI features)</span></label>
|
| 774 |
+
<input type="password" id="anthropic_api_key" name="anthropic_api_key"
|
| 775 |
+
autocomplete="off" spellcheck="false"
|
| 776 |
+
placeholder="sk-ant-…">
|
| 777 |
+
<small>Used once for this run. Sent over HTTPS, held in memory only, never written to disk or logs. Required for topic-based preview and any AI assist toggles below.</small>
|
| 778 |
+
</div>
|
| 779 |
+
|
| 780 |
+
<div class="vgm-field vgm-field--preview">
|
| 781 |
<div class="vgm-preview-btn-row">
|
| 782 |
<button type="button" id="preview-btn" class="vgm-preview-btn" disabled>
|
| 783 |
Preview scenes
|
|
|
|
| 786 |
Preview topic scenes
|
| 787 |
</button>
|
| 788 |
</div>
|
| 789 |
+
<p class="vgm-preview-hint">Recommended — pick which slides (or topics) to include before generating. Topic preview needs the transcript and API key above.</p>
|
| 790 |
<div class="vgm-preview-status" id="preview-status" aria-live="polite"></div>
|
| 791 |
<div class="vgm-preview-bar" id="preview-bar" aria-hidden="true"></div>
|
| 792 |
</div>
|
|
|
|
| 806 |
<input type="hidden" name="preview_token" id="preview-token-input">
|
| 807 |
<input type="hidden" name="selected_indices" id="selected-indices-input">
|
| 808 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 809 |
</div>
|
| 810 |
|
| 811 |
<div class="vgm-section">
|
| 812 |
<h3 class="vgm-section__title">2. AI assist (optional)</h3>
|
| 813 |
<p class="vgm-section__intro">
|
| 814 |
+
With an API key above, Claude can enrich each segment. Toggle whichever you want; each runs only when checked.
|
| 815 |
</p>
|
| 816 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 817 |
<div class="vgm-llm-grid">
|
| 818 |
<label class="vgm-llm-toggle">
|
| 819 |
<input type="checkbox" name="llm_section_title" value="true">
|