agentcyone commited on
Commit
f04280d
·
verified ·
1 Parent(s): 6847a87

undefined - Initial Deployment

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