Spaces:
Sleeping
Sleeping
Update static/index.html
Browse files- static/index.html +9 -1
static/index.html
CHANGED
|
@@ -15,7 +15,7 @@
|
|
| 15 |
<div class="mb-4">
|
| 16 |
<label for="model" class="block text-sm font-medium text-gray-700">Select AI Model (Explicit Content)</label>
|
| 17 |
<select id="model" class="mt-1 block w-full p-2 border border-gray-300 rounded-md" required>
|
| 18 |
-
|
| 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>
|
|
@@ -144,11 +144,19 @@
|
|
| 144 |
if (result.error) {
|
| 145 |
document.getElementById("manuscript").value = `Error: ${result.error}`;
|
| 146 |
} else {
|
|
|
|
| 147 |
document.getElementById("outline").value = result.outline || "";
|
| 148 |
document.getElementById("characters").value = result.characters || "";
|
| 149 |
document.getElementById("locations").value = result.locations || "";
|
| 150 |
document.getElementById("objects").value = result.objects || "";
|
| 151 |
document.getElementById("manuscript").value = result.manuscript_sample || "";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 152 |
}
|
| 153 |
} catch (error) {
|
| 154 |
statusDiv.textContent = `Error: ${error.message}`;
|
|
|
|
| 15 |
<div class="mb-4">
|
| 16 |
<label for="model" class="block text-sm font-medium text-gray-700">Select AI Model (Explicit Content)</label>
|
| 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>
|
|
|
|
| 144 |
if (result.error) {
|
| 145 |
document.getElementById("manuscript").value = `Error: ${result.error}`;
|
| 146 |
} else {
|
| 147 |
+
// Structured fields
|
| 148 |
document.getElementById("outline").value = result.outline || "";
|
| 149 |
document.getElementById("characters").value = result.characters || "";
|
| 150 |
document.getElementById("locations").value = result.locations || "";
|
| 151 |
document.getElementById("objects").value = result.objects || "";
|
| 152 |
document.getElementById("manuscript").value = result.manuscript_sample || "";
|
| 153 |
+
|
| 154 |
+
// Fallback if no structured data
|
| 155 |
+
if (!result.outline && result.raw_response) {
|
| 156 |
+
document.getElementById("outline").value = result.fallback_outline || result.raw_response;
|
| 157 |
+
document.getElementById("manuscript").value = result.raw_response;
|
| 158 |
+
alert("AI output wasn't strict JSON—showing raw response as fallback in Outline and Manuscript. Check server logs for details.");
|
| 159 |
+
}
|
| 160 |
}
|
| 161 |
} catch (error) {
|
| 162 |
statusDiv.textContent = `Error: ${error.message}`;
|