Spaces:
Running
Running
File size: 16,742 Bytes
f04280d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>TOTALITY AI Web System</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
.gradient-bg {
background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #1d4ed8 100%);
}
.response-container {
min-height: 200px;
transition: all 0.3s ease;
}
.typing-indicator::after {
content: '...';
animation: typing 1.5s infinite;
}
@keyframes typing {
0% { content: '.'; }
33% { content: '..'; }
66% { content: '...'; }
}
.word-count {
transition: color 0.3s;
}
.word-count.warning {
color: #f59e0b;
}
.word-count.error {
color: #ef4444;
}
</style>
</head>
<body class="bg-gray-100 font-sans">
<!-- Navigation -->
<nav class="gradient-bg text-white shadow-lg">
<div class="container mx-auto px-4 py-3 flex justify-between items-center">
<div class="flex items-center space-x-2">
<i class="fas fa-robot text-2xl"></i>
<h1 class="text-xl font-bold">TOTALITY AI</h1>
</div>
<div class="hidden md:flex space-x-4">
<a href="#" class="hover:text-blue-200 transition">Home</a>
<a href="#" class="hover:text-blue-200 transition">About</a>
<a href="#" class="hover:text-blue-200 transition">API</a>
<a href="#" class="hover:text-blue-200 transition">Docs</a>
</div>
<button class="md:hidden text-xl">
<i class="fas fa-bars"></i>
</button>
</div>
</nav>
<!-- Main Content -->
<main class="container mx-auto px-4 py-8">
<div class="max-w-4xl mx-auto">
<!-- Header Section -->
<section class="text-center mb-12">
<h2 class="text-3xl md:text-4xl font-bold text-gray-800 mb-4">AI with Biblical Guardrails</h2>
<p class="text-gray-600 max-w-2xl mx-auto">
Experience AI-generated content filtered through our biblical concordance system to ensure alignment with scriptural values.
</p>
</section>
<!-- AI Interface -->
<section class="bg-white rounded-xl shadow-md overflow-hidden mb-8">
<div class="p-6 border-b border-gray-200">
<h3 class="text-xl font-semibold text-gray-800">AI Prompt Interface</h3>
</div>
<div class="p-6">
<div class="mb-6">
<label for="prompt" class="block text-sm font-medium text-gray-700 mb-2">Enter your prompt:</label>
<div class="relative">
<textarea
id="prompt"
rows="4"
class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition"
placeholder="Ask me anything..."></textarea>
<div class="absolute bottom-2 right-2 text-xs text-gray-500">
<span id="wordCount" class="word-count">0</span> words
</div>
</div>
</div>
<div class="flex flex-col sm:flex-row justify-between items-center gap-4">
<div class="flex items-center space-x-2">
<div class="flex items-center">
<input type="checkbox" id="biblicalFilter" checked class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded">
<label for="biblicalFilter" class="ml-2 block text-sm text-gray-700">Biblical Filter</label>
</div>
<div class="flex items-center">
<input type="checkbox" id="creativeMode" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded">
<label for="creativeMode" class="ml-2 block text-sm text-gray-700">Creative Mode</label>
</div>
</div>
<button
id="generateBtn"
class="gradient-bg text-white px-6 py-3 rounded-lg font-medium hover:opacity-90 transition flex items-center justify-center w-full sm:w-auto">
<i class="fas fa-bolt mr-2"></i> Generate Response
</button>
</div>
</div>
</section>
<!-- Response Section -->
<section class="bg-white rounded-xl shadow-md overflow-hidden mb-8">
<div class="p-6 border-b border-gray-200 flex justify-between items-center">
<h3 class="text-xl font-semibold text-gray-800">AI Response</h3>
<div class="flex items-center space-x-2">
<span id="statusIndicator" class="text-xs px-2 py-1 rounded-full bg-gray-100 text-gray-600">
Ready
</span>
<button id="copyBtn" class="text-gray-500 hover:text-blue-500 transition">
<i class="far fa-copy"></i>
</button>
</div>
</div>
<div class="p-6">
<div id="responseContainer" class="response-container bg-gray-50 rounded-lg p-4 text-gray-700">
<p id="responseText" class="whitespace-pre-wrap">Your AI-generated response will appear here...</p>
<div id="typingIndicator" class="typing-indicator hidden text-gray-400 mt-2">AI is thinking</div>
</div>
</div>
</section>
<!-- Filter Information -->
<section class="bg-white rounded-xl shadow-md overflow-hidden">
<div class="p-6 border-b border-gray-200">
<h3 class="text-xl font-semibold text-gray-800">Biblical Filter Information</h3>
</div>
<div class="p-6">
<div class="mb-4">
<h4 class="font-medium text-gray-700 mb-2">Filter Status: <span id="filterStatus" class="text-green-600">Active</span></h4>
<p class="text-sm text-gray-600">
Our biblical concordance filter automatically screens responses for content that doesn't align with scriptural values.
</p>
</div>
<div class="bg-blue-50 border-l-4 border-blue-500 p-4">
<div class="flex">
<div class="flex-shrink-0">
<i class="fas fa-info-circle text-blue-500"></i>
</div>
<div class="ml-3">
<p class="text-sm text-blue-700">
<span id="filteredWordsCount">0</span> words/phrases were filtered from responses today.
</p>
</div>
</div>
</div>
</div>
</section>
</div>
</main>
<!-- Footer -->
<footer class="gradient-bg text-white py-8">
<div class="container mx-auto px-4">
<div class="flex flex-col md:flex-row justify-between items-center">
<div class="mb-4 md:mb-0">
<div class="flex items-center space-x-2">
<i class="fas fa-robot text-2xl"></i>
<h2 class="text-xl font-bold">TOTALITY AI</h2>
</div>
<p class="text-blue-200 mt-2">AI with biblical values</p>
</div>
<div class="flex space-x-6">
<a href="#" class="hover:text-blue-200 transition"><i class="fab fa-github text-xl"></i></a>
<a href="#" class="hover:text-blue-200 transition"><i class="fab fa-twitter text-xl"></i></a>
<a href="#" class="hover:text-blue-200 transition"><i class="fab fa-discord text-xl"></i></a>
</div>
</div>
<div class="border-t border-blue-800 mt-6 pt-6 text-sm text-blue-200 text-center">
<p>© 2023 TOTALITY AI System. All rights reserved.</p>
</div>
</div>
</footer>
<script>
document.addEventListener('DOMContentLoaded', function() {
// DOM Elements
const promptTextarea = document.getElementById('prompt');
const generateBtn = document.getElementById('generateBtn');
const responseText = document.getElementById('responseText');
const responseContainer = document.getElementById('responseContainer');
const typingIndicator = document.getElementById('typingIndicator');
const statusIndicator = document.getElementById('statusIndicator');
const wordCount = document.getElementById('wordCount');
const copyBtn = document.getElementById('copyBtn');
const biblicalFilter = document.getElementById('biblicalFilter');
const filterStatus = document.getElementById('filterStatus');
const filteredWordsCount = document.getElementById('filteredWordsCount');
// Sample biblical lexicon (in a real app, this would come from an API)
const biblicalLexicon = {
"violence": { allowed: false, reason: "Promotes harm" },
"hate": { allowed: false, reason: "Contrary to love" },
"greed": { allowed: false, reason: "Condemned in scripture" },
"lust": { allowed: false, reason: "Impure thoughts" },
"blasphemy": { allowed: false, reason: "Against God" },
"witchcraft": { allowed: false, reason: "Forbidden" },
"idolatry": { allowed: false, reason: "False worship" },
"adultery": { allowed: false, reason: "Against marriage" },
"stealing": { allowed: false, reason: "Commandment violation" },
"lying": { allowed: false, reason: "Truth is valued" }
};
// Word count tracking
promptTextarea.addEventListener('input', function() {
const text = this.value.trim();
const count = text ? text.split(/\s+/).length : 0;
wordCount.textContent = count;
// Update color based on count
wordCount.classList.remove('warning', 'error');
if (count > 100) wordCount.classList.add('warning');
if (count > 200) wordCount.classList.add('error');
});
// Copy response button
copyBtn.addEventListener('click', function() {
const textToCopy = responseText.textContent;
navigator.clipboard.writeText(textToCopy).then(() => {
const originalIcon = this.innerHTML;
this.innerHTML = '<i class="fas fa-check"></i>';
setTimeout(() => {
this.innerHTML = originalIcon;
}, 2000);
});
});
// Biblical filter toggle
biblicalFilter.addEventListener('change', function() {
if (this.checked) {
filterStatus.textContent = 'Active';
filterStatus.className = 'text-green-600';
} else {
filterStatus.textContent = 'Inactive';
filterStatus.className = 'text-red-600';
}
});
// Generate response
generateBtn.addEventListener('click', async function() {
const prompt = promptTextarea.value.trim();
if (!prompt) {
alert('Please enter a prompt');
return;
}
// Show loading state
this.disabled = true;
this.innerHTML = '<i class="fas fa-spinner fa-spin mr-2"></i> Processing...';
typingIndicator.classList.remove('hidden');
responseContainer.classList.add('bg-gray-100');
statusIndicator.textContent = 'Processing';
statusIndicator.className = 'text-xs px-2 py-1 rounded-full bg-yellow-100 text-yellow-800';
// Simulate API call with timeout
setTimeout(() => {
// Generate mock response
let response = `Thank you for your question about "${prompt}". In accordance with ${biblicalFilter.checked ? 'biblical principles' : 'your request for unfiltered content'}, here's a thoughtful response:\n\n`;
// Add some random content
const phrases = [
"The scriptures teach us about love and compassion for all people.",
"Wisdom comes from understanding and applying God's word in our lives.",
"We are called to be peacemakers in a world that often values conflict.",
"Faithfulness in small things leads to greatness in God's kingdom.",
"The fruits of the Spirit should be evident in our daily interactions."
];
for (let i = 0; i < 3; i++) {
response += phrases[Math.floor(Math.random() * phrases.length)] + " ";
}
// Apply biblical filter if enabled
let filteredWords = 0;
if (biblicalFilter.checked) {
Object.keys(biblicalLexicon).forEach(word => {
if (!biblicalLexicon[word].allowed && response.toLowerCase().includes(word.toLowerCase())) {
filteredWords++;
const regex = new RegExp(word, 'gi');
response = response.replace(regex, '[FILTERED]');
}
});
}
// Update filtered words count
filteredWordsCount.textContent = filteredWords;
// Display response
responseText.textContent = response;
// Reset UI
this.disabled = false;
this.innerHTML = '<i class="fas fa-bolt mr-2"></i> Generate Response';
typingIndicator.classList.add('hidden');
responseContainer.classList.remove('bg-gray-100');
statusIndicator.textContent = 'Completed';
statusIndicator.className = 'text-xs px-2 py-1 rounded-full bg-green-100 text-green-800';
}, 2000);
});
// Initialize word count
promptTextarea.dispatchEvent(new Event('input'));
});
</script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=agentcyone/totality-ai" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html> |