Spaces:
Sleeping
Sleeping
Update static/index.html
Browse files- static/index.html +27 -6
static/index.html
CHANGED
|
@@ -17,12 +17,9 @@
|
|
| 17 |
<select id="model" class="mt-1 block w-full p-2 border border-gray-300 rounded-md" required>
|
| 18 |
<option value="nousresearch/hermes-3-llama-3.1-70b">Hermes 3 Llama 3.1 70B (Uncensored, Explicit)</option>
|
| 19 |
<option value="deepseek/deepseek-chat-v3-0324:free">DeepSeek Chat (Free)</option>
|
| 20 |
-
<option value="deepseek/deepseek-chat-v3-0324">DeepSeek Chat (Paid)</option>
|
| 21 |
<option value="deepseek/deepseek-r1-0528:free">DeepSeek R1 (Free)</option>
|
| 22 |
-
<option value="deepseek/deepseek-r1-0528">DeepSeek R1 (Paid)</option>
|
| 23 |
<option value="tngtech/deepseek-r1t2-chimera:free">DeepSeek TNG (Free)</option>
|
| 24 |
<option value="x-ai/grok-4">Grok 4</option>
|
| 25 |
-
<option value="x-ai/grok-4-fast">Grok 4</option>
|
| 26 |
<option value="x-ai/grok-3">Grok 3</option>
|
| 27 |
<option value="anthropic/claude-3.7-sonnet">Claude Sonnet 3.7</option>
|
| 28 |
<option value="anthropic/claude-3.5-sonnet">Claude 3.5 Sonnet</option>
|
|
@@ -31,6 +28,22 @@
|
|
| 31 |
</select>
|
| 32 |
</div>
|
| 33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
<!-- File Upload or Transcript Input -->
|
| 35 |
<div class="mb-4">
|
| 36 |
<label for="file" class="block text-sm font-medium text-gray-700">Upload Transcript File (TXT or PDF)</label>
|
|
@@ -43,13 +56,13 @@
|
|
| 43 |
|
| 44 |
<!-- Generate Button -->
|
| 45 |
<div class="mb-4">
|
| 46 |
-
<button id="generate_novel" class="w-full bg-purple-600 text-white p-2 rounded-md hover:bg-purple-700">Generate Novel Structure
|
| 47 |
</div>
|
| 48 |
|
| 49 |
<!-- Outputs -->
|
| 50 |
<div id="outputs" class="space-y-4 hidden">
|
| 51 |
<div>
|
| 52 |
-
<label class="block text-sm font-medium text-gray-700">Outline
|
| 53 |
<textarea id="outline" class="mt-1 block w-full p-2 border border-gray-300 rounded-md" rows="20" readonly placeholder="Streaming generation..."></textarea>
|
| 54 |
</div>
|
| 55 |
<button id="copy_all" class="mt-2 bg-green-600 text-white p-2 rounded-md hover:bg-green-700">Copy Outline for NovelCrafter</button>
|
|
@@ -97,6 +110,9 @@
|
|
| 97 |
const model = document.getElementById("model").value;
|
| 98 |
const transcript = transcriptTextarea.value.trim();
|
| 99 |
const file = fileInput.files[0];
|
|
|
|
|
|
|
|
|
|
| 100 |
if (!transcript && !file) {
|
| 101 |
alert("Please enter a transcript or select a file.");
|
| 102 |
return;
|
|
@@ -110,6 +126,11 @@
|
|
| 110 |
try {
|
| 111 |
const formData = new FormData();
|
| 112 |
formData.append('model', model);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 113 |
if (file) {
|
| 114 |
formData.append('file', file);
|
| 115 |
} else {
|
|
@@ -149,7 +170,7 @@
|
|
| 149 |
document.getElementById("copy_all").addEventListener("click", () => {
|
| 150 |
const outline = document.getElementById("outline").value;
|
| 151 |
navigator.clipboard.writeText(outline)
|
| 152 |
-
.then(() => alert("Outline copied to clipboard! Paste into NovelCrafter for full
|
| 153 |
.catch(err => console.error('Failed to copy: ', err));
|
| 154 |
});
|
| 155 |
</script>
|
|
|
|
| 17 |
<select id="model" class="mt-1 block w-full p-2 border border-gray-300 rounded-md" required>
|
| 18 |
<option value="nousresearch/hermes-3-llama-3.1-70b">Hermes 3 Llama 3.1 70B (Uncensored, Explicit)</option>
|
| 19 |
<option value="deepseek/deepseek-chat-v3-0324:free">DeepSeek Chat (Free)</option>
|
|
|
|
| 20 |
<option value="deepseek/deepseek-r1-0528:free">DeepSeek R1 (Free)</option>
|
|
|
|
| 21 |
<option value="tngtech/deepseek-r1t2-chimera:free">DeepSeek TNG (Free)</option>
|
| 22 |
<option value="x-ai/grok-4">Grok 4</option>
|
|
|
|
| 23 |
<option value="x-ai/grok-3">Grok 3</option>
|
| 24 |
<option value="anthropic/claude-3.7-sonnet">Claude Sonnet 3.7</option>
|
| 25 |
<option value="anthropic/claude-3.5-sonnet">Claude 3.5 Sonnet</option>
|
|
|
|
| 28 |
</select>
|
| 29 |
</div>
|
| 30 |
|
| 31 |
+
<!-- Structure Config -->
|
| 32 |
+
<div class="mb-4 grid grid-cols-1 md:grid-cols-3 gap-4">
|
| 33 |
+
<div>
|
| 34 |
+
<label for="chapter_count" class="block text-sm font-medium text-gray-700">Chapter Count</label>
|
| 35 |
+
<input type="number" id="chapter_count" value="10" min="1" max="50" class="mt-1 block w-full p-2 border border-gray-300 rounded-md">
|
| 36 |
+
</div>
|
| 37 |
+
<div>
|
| 38 |
+
<label for="word_count" class="block text-sm font-medium text-gray-700">Total Word Count</label>
|
| 39 |
+
<input type="number" id="word_count" value="90000" min="1000" max="500000" class="mt-1 block w-full p-2 border border-gray-300 rounded-md">
|
| 40 |
+
</div>
|
| 41 |
+
<div>
|
| 42 |
+
<label for="custom_prompt" class="block text-sm font-medium text-gray-700">Custom Prompt (Optional)</label>
|
| 43 |
+
<textarea id="custom_prompt" class="mt-1 block w-full p-2 border border-gray-300 rounded-md" rows="2" placeholder="e.g., Make the outline more gothic horror themed with vampire elements..."></textarea>
|
| 44 |
+
</div>
|
| 45 |
+
</div>
|
| 46 |
+
|
| 47 |
<!-- File Upload or Transcript Input -->
|
| 48 |
<div class="mb-4">
|
| 49 |
<label for="file" class="block text-sm font-medium text-gray-700">Upload Transcript File (TXT or PDF)</label>
|
|
|
|
| 56 |
|
| 57 |
<!-- Generate Button -->
|
| 58 |
<div class="mb-4">
|
| 59 |
+
<button id="generate_novel" class="w-full bg-purple-600 text-white p-2 rounded-md hover:bg-purple-700">Generate Novel Structure</button>
|
| 60 |
</div>
|
| 61 |
|
| 62 |
<!-- Outputs -->
|
| 63 |
<div id="outputs" class="space-y-4 hidden">
|
| 64 |
<div>
|
| 65 |
+
<label class="block text-sm font-medium text-gray-700">Outline</label>
|
| 66 |
<textarea id="outline" class="mt-1 block w-full p-2 border border-gray-300 rounded-md" rows="20" readonly placeholder="Streaming generation..."></textarea>
|
| 67 |
</div>
|
| 68 |
<button id="copy_all" class="mt-2 bg-green-600 text-white p-2 rounded-md hover:bg-green-700">Copy Outline for NovelCrafter</button>
|
|
|
|
| 110 |
const model = document.getElementById("model").value;
|
| 111 |
const transcript = transcriptTextarea.value.trim();
|
| 112 |
const file = fileInput.files[0];
|
| 113 |
+
const chapterCount = document.getElementById("chapter_count").value;
|
| 114 |
+
const wordCount = document.getElementById("word_count").value;
|
| 115 |
+
const customPrompt = document.getElementById("custom_prompt").value.trim();
|
| 116 |
if (!transcript && !file) {
|
| 117 |
alert("Please enter a transcript or select a file.");
|
| 118 |
return;
|
|
|
|
| 126 |
try {
|
| 127 |
const formData = new FormData();
|
| 128 |
formData.append('model', model);
|
| 129 |
+
formData.append('chapter_count', chapterCount);
|
| 130 |
+
formData.append('word_count', wordCount);
|
| 131 |
+
if (customPrompt) {
|
| 132 |
+
formData.append('custom_prompt', customPrompt);
|
| 133 |
+
}
|
| 134 |
if (file) {
|
| 135 |
formData.append('file', file);
|
| 136 |
} else {
|
|
|
|
| 170 |
document.getElementById("copy_all").addEventListener("click", () => {
|
| 171 |
const outline = document.getElementById("outline").value;
|
| 172 |
navigator.clipboard.writeText(outline)
|
| 173 |
+
.then(() => alert("Outline copied to clipboard! Paste into NovelCrafter for full manuscript."))
|
| 174 |
.catch(err => console.error('Failed to copy: ', err));
|
| 175 |
});
|
| 176 |
</script>
|