Spaces:
Running
Running
| <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> |