aurarecall1 / index.html
privateuserh's picture
Add 2 files
7a108c6 verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AuraRecall | AI-Powered Memory 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>
.file-upload-container {
transition: all 0.3s ease;
}
.file-upload-container:hover {
transform: translateY(-2px);
}
.ai-response-container {
max-height: 300px;
overflow-y: auto;
}
.pulse-animation {
animation: pulse 2s infinite;
}
.memory-object {
background: linear-gradient(145deg, #ffffff, #f5f3ff);
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}
@keyframes pulse {
0% { opacity: 0.6; }
50% { opacity: 1; }
100% { opacity: 0.6; }
}
.gradient-border {
border: 2px solid transparent;
background: linear-gradient(white, white) padding-box,
linear-gradient(to right, #6366f1, #8b5cf6) border-box;
}
.processing-step {
position: relative;
}
.processing-step:not(:last-child):after {
content: "";
position: absolute;
right: -20px;
top: 50%;
transform: translateY(-50%);
width: 0;
height: 0;
border-top: 10px solid transparent;
border-bottom: 10px solid transparent;
border-left: 10px solid #8b5cf6;
}
</style>
</head>
<body class="bg-gray-50 min-h-screen">
<div class="container mx-auto px-4 py-8 max-w-6xl">
<!-- Header -->
<header class="mb-12 text-center">
<div class="flex justify-center items-center mb-4">
<div class="w-12 h-12 rounded-full bg-indigo-500 flex items-center justify-center mr-4">
<i class="fas fa-brain text-white text-xl"></i>
</div>
<h1 class="text-4xl font-bold text-indigo-800">AuraRecall</h1>
</div>
<h2 class="text-2xl font-semibold text-gray-700">AI-Powered Memory System with Cloudflare Integration</h2>
<div class="w-24 h-1 bg-indigo-500 mx-auto mt-4 rounded-full"></div>
</header>
<!-- Main Content -->
<div class="grid grid-cols-1 lg:grid-cols-2 gap-8">
<!-- File Upload Section -->
<div class="bg-white rounded-xl shadow-md overflow-hidden gradient-border">
<div class="bg-indigo-600 px-6 py-4">
<h3 class="text-xl font-semibold text-white flex items-center">
<i class="fas fa-cloud-upload-alt mr-3"></i> Memory Fragment Upload
</h3>
</div>
<div class="p-6">
<div id="file-upload-container" class="file-upload-container border-2 border-dashed border-gray-300 rounded-lg p-8 text-center cursor-pointer hover:border-indigo-400 transition">
<i class="fas fa-file-upload text-4xl text-gray-400 mb-4"></i>
<p class="text-gray-600 mb-2">Drag & drop your memory fragment here</p>
<p class="text-sm text-gray-500 mb-4">Supports audio (MP3, WAV) and video (MP4, MOV) files</p>
<input type="file" id="file-input" class="hidden" accept=".mp3,.wav,.mp4,.mov">
<label for="file-input" class="px-4 py-2 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 transition cursor-pointer">
Select File
</label>
</div>
<div id="upload-progress" class="mt-6 hidden">
<div class="flex justify-between mb-2">
<span class="text-sm font-medium text-gray-700">Uploading...</span>
<span id="upload-percent" class="text-sm font-medium text-indigo-600">0%</span>
</div>
<div class="w-full bg-gray-200 rounded-full h-2.5">
<div id="upload-progress-bar" class="bg-indigo-600 h-2.5 rounded-full" style="width: 0%"></div>
</div>
</div>
<div id="upload-success" class="mt-6 p-4 bg-green-50 rounded-lg hidden">
<div class="flex items-center">
<i class="fas fa-check-circle text-green-500 text-xl mr-3"></i>
<div>
<h4 class="font-medium text-green-800">Upload Successful!</h4>
<p class="text-sm text-green-600">Your memory fragment is being processed.</p>
</div>
</div>
</div>
<div id="upload-error" class="mt-6 p-4 bg-red-50 rounded-lg hidden">
<div class="flex items-center">
<i class="fas fa-exclamation-circle text-red-500 text-xl mr-3"></i>
<div>
<h4 class="font-medium text-red-800">Upload Failed</h4>
<p id="error-message" class="text-sm text-red-600"></p>
</div>
</div>
</div>
</div>
</div>
<!-- AI Query Section -->
<div class="bg-white rounded-xl shadow-md overflow-hidden gradient-border">
<div class="bg-purple-600 px-6 py-4">
<h3 class="text-xl font-semibold text-white flex items-center">
<i class="fas fa-robot mr-3"></i> Cloudflare AI Gateway
</h3>
</div>
<div class="p-6">
<div class="mb-6">
<label for="ai-query" class="block text-sm font-medium text-gray-700 mb-2">Ask about your memories</label>
<div class="flex">
<input type="text" id="ai-query" placeholder="E.g. What was that restaurant we visited in Paris?"
class="flex-1 px-4 py-2 border border-gray-300 rounded-l-lg focus:ring-indigo-500 focus:border-indigo-500">
<button id="send-query" class="px-4 py-2 bg-purple-600 text-white rounded-r-lg hover:bg-purple-700 transition">
<i class="fas fa-paper-plane"></i>
</button>
</div>
</div>
<div id="ai-thinking" class="hidden mb-6 p-4 bg-purple-50 rounded-lg">
<div class="flex items-center">
<div class="pulse-animation">
<i class="fas fa-circle-notch fa-spin text-purple-500 mr-3"></i>
</div>
<span class="text-purple-700">Processing your query with AI...</span>
</div>
</div>
<div id="ai-response-container" class="hidden">
<h4 class="font-medium text-gray-700 mb-3 flex items-center">
<i class="fas fa-comment-dots text-purple-500 mr-2"></i> AI Response
</h4>
<div class="ai-response-container bg-gray-50 p-4 rounded-lg border border-gray-200">
<p id="ai-response" class="text-gray-700"></p>
</div>
<div class="mt-3 text-right">
<button id="refine-query" class="text-sm px-3 py-1 bg-gray-100 text-gray-600 rounded hover:bg-gray-200 transition">
<i class="fas fa-redo mr-1"></i> Refine Query
</button>
</div>
</div>
<div id="ai-error" class="hidden mt-6 p-4 bg-red-50 rounded-lg">
<div class="flex items-center">
<i class="fas fa-exclamation-circle text-red-500 text-xl mr-3"></i>
<div>
<h4 class="font-medium text-red-800">AI Query Failed</h4>
<p id="ai-error-message" class="text-sm text-red-600"></p>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- AI Processing Demo Section -->
<div class="mt-12 bg-white rounded-xl shadow-md overflow-hidden">
<div class="bg-gradient-to-r from-indigo-600 to-purple-600 px-6 py-4">
<h3 class="text-xl font-semibold text-white flex items-center">
<i class="fas fa-microchip mr-3"></i> AI Processing Demonstration
</h3>
</div>
<div class="p-6">
<p class="text-gray-600 mb-6">
This section demonstrates how AuraRecall processes your memory fragments to create structured memory objects.
</p>
<div class="grid grid-cols-1 md:grid-cols-3 gap-4 mb-8">
<div class="processing-step bg-indigo-50 p-4 rounded-lg flex flex-col items-center">
<div class="w-12 h-12 rounded-full bg-indigo-100 flex items-center justify-center mb-3">
<i class="fas fa-file-audio text-indigo-600"></i>
</div>
<h4 class="font-medium text-indigo-800 text-center">Audio Transcription</h4>
<p class="text-sm text-gray-600 text-center mt-1">Convert speech to text</p>
<div id="transcription-result" class="mt-3 text-sm text-gray-700 hidden"></div>
</div>
<div class="processing-step bg-purple-50 p-4 rounded-lg flex flex-col items-center">
<div class="w-12 h-12 rounded-full bg-purple-100 flex items-center justify-center mb-3">
<i class="fas fa-image text-purple-600"></i>
</div>
<h4 class="font-medium text-purple-800 text-center">Visual Analysis</h4>
<p class="text-sm text-gray-600 text-center mt-1">Detect objects and faces</p>
<div id="visual-result" class="mt-3 text-sm text-gray-700 hidden"></div>
</div>
<div class="processing-step bg-blue-50 p-4 rounded-lg flex flex-col items-center">
<div class="w-12 h-12 rounded-full bg-blue-100 flex items-center justify-center mb-3">
<i class="fas fa-link text-blue-600"></i>
</div>
<h4 class="font-medium text-blue-800 text-center">Context Linking</h4>
<p class="text-sm text-gray-600 text-center mt-1">Connect related elements</p>
<div id="linking-result" class="mt-3 text-sm text-gray-700 hidden"></div>
</div>
</div>
<div id="memory-object-demo" class="hidden">
<h4 class="font-medium text-gray-700 mb-3 flex items-center">
<i class="fas fa-cube text-indigo-500 mr-2"></i> Generated Memory Object
</h4>
<div class="memory-object p-4 rounded-lg border border-gray-200">
<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
<div class="bg-indigo-50 p-3 rounded">
<h5 class="font-medium text-indigo-700 mb-2 flex items-center">
<i class="fas fa-align-left mr-2 text-sm"></i> Transcription
</h5>
<p id="memory-transcription" class="text-sm text-gray-700"></p>
</div>
<div class="bg-purple-50 p-3 rounded">
<h5 class="font-medium text-purple-700 mb-2 flex items-center">
<i class="fas fa-tags mr-2 text-sm"></i> Detected Entities
</h5>
<div id="memory-entities" class="text-sm text-gray-700"></div>
</div>
<div class="bg-blue-50 p-3 rounded">
<h5 class="font-medium text-blue-700 mb-2 flex items-center">
<i class="fas fa-project-diagram mr-2 text-sm"></i> Context Links
</h5>
<div id="memory-links" class="text-sm text-gray-700"></div>
</div>
</div>
<div class="mt-4 pt-3 border-t border-gray-200">
<div class="flex justify-between items-center">
<div class="flex items-center">
<i class="fas fa-fingerprint text-gray-500 mr-2"></i>
<span class="text-xs text-gray-500">Bio-signature: <span class="text-gray-700">user_authenticated</span></span>
</div>
<div class="text-xs text-gray-500">
<i class="fas fa-calendar-alt mr-1"></i>
<span id="memory-timestamp"></span>
</div>
</div>
</div>
</div>
</div>
<div class="mt-6 text-center">
<button id="demo-processing" class="px-4 py-2 bg-gradient-to-r from-indigo-500 to-purple-500 text-white rounded-lg hover:from-indigo-600 hover:to-purple-600 transition">
<i class="fas fa-play-circle mr-2"></i> Run Processing Demo
</button>
</div>
</div>
</div>
<!-- System Status -->
<div class="mt-12 bg-white rounded-xl shadow-md overflow-hidden">
<div class="bg-gray-800 px-6 py-4">
<h3 class="text-xl font-semibold text-white flex items-center">
<i class="fas fa-server mr-3"></i> System Status
</h3>
</div>
<div class="p-6">
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
<div class="border border-gray-200 rounded-lg p-4">
<div class="flex items-center mb-3">
<div class="w-10 h-10 rounded-full bg-indigo-100 flex items-center justify-center mr-3">
<i class="fas fa-upload text-indigo-500"></i>
</div>
<h4 class="font-medium text-gray-700">Ingestion Service</h4>
</div>
<div class="flex items-center">
<div class="w-2 h-2 rounded-full bg-green-500 mr-2"></div>
<span class="text-sm text-gray-600">Operational</span>
</div>
</div>
<div class="border border-gray-200 rounded-lg p-4">
<div class="flex items-center mb-3">
<div class="w-10 h-10 rounded-full bg-purple-100 flex items-center justify-center mr-3">
<i class="fas fa-network-wired text-purple-500"></i>
</div>
<h4 class="font-medium text-gray-700">Cloudflare Gateway</h4>
</div>
<div class="flex items-center">
<div class="w-2 h-2 rounded-full bg-green-500 mr-2"></div>
<span class="text-sm text-gray-600">Connected</span>
</div>
</div>
<div class="border border-gray-200 rounded-lg p-4">
<div class="flex items-center mb-3">
<div class="w-10 h-10 rounded-full bg-blue-100 flex items-center justify-center mr-3">
<i class="fas fa-database text-blue-500"></i>
</div>
<h4 class="font-medium text-gray-700">Memory Database</h4>
</div>
<div class="flex items-center">
<div class="w-2 h-2 rounded-full bg-green-500 mr-2"></div>
<span class="text-sm text-gray-600">Synced</span>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', function() {
// File Upload Handling
const fileInput = document.getElementById('file-input');
const uploadContainer = document.getElementById('file-upload-container');
const uploadProgress = document.getElementById('upload-progress');
const progressBar = document.getElementById('upload-progress-bar');
const uploadPercent = document.getElementById('upload-percent');
const uploadSuccess = document.getElementById('upload-success');
const uploadError = document.getElementById('upload-error');
const errorMessage = document.getElementById('error-message');
// Drag and drop functionality
uploadContainer.addEventListener('dragover', (e) => {
e.preventDefault();
uploadContainer.classList.add('border-indigo-500', 'bg-indigo-50');
});
uploadContainer.addEventListener('dragleave', () => {
uploadContainer.classList.remove('border-indigo-500', 'bg-indigo-50');
});
uploadContainer.addEventListener('drop', (e) => {
e.preventDefault();
uploadContainer.classList.remove('border-indigo-500', 'bg-indigo-50');
if (e.dataTransfer.files.length) {
fileInput.files = e.dataTransfer.files;
handleFileUpload();
}
});
fileInput.addEventListener('change', handleFileUpload);
function handleFileUpload() {
const file = fileInput.files[0];
if (!file) return;
// Validate file type
const validTypes = ['audio/mp3', 'audio/wav', 'video/mp4', 'video/quicktime'];
if (!validTypes.includes(file.type)) {
showUploadError('Invalid file type. Please upload an audio or video file.');
return;
}
// Validate file size (max 100MB)
if (file.size > 100 * 1024 * 1024) {
showUploadError('File too large. Maximum size is 100MB.');
return;
}
// Show upload progress
uploadProgress.classList.remove('hidden');
uploadSuccess.classList.add('hidden');
uploadError.classList.add('hidden');
// Simulate upload progress (in a real app, this would be actual upload progress)
let progress = 0;
const interval = setInterval(() => {
progress += Math.random() * 10;
if (progress >= 100) {
progress = 100;
clearInterval(interval);
// Simulate successful upload
setTimeout(() => {
uploadProgress.classList.add('hidden');
uploadSuccess.classList.remove('hidden');
// Reset after 5 seconds
setTimeout(() => {
uploadSuccess.classList.add('hidden');
fileInput.value = '';
}, 5000);
}, 500);
}
progressBar.style.width = `${progress}%`;
uploadPercent.textContent = `${Math.round(progress)}%`;
}, 300);
}
function showUploadError(message) {
errorMessage.textContent = message;
uploadError.classList.remove('hidden');
uploadProgress.classList.add('hidden');
uploadSuccess.classList.add('hidden');
// Hide error after 5 seconds
setTimeout(() => {
uploadError.classList.add('hidden');
}, 5000);
}
// AI Query Handling
const aiQueryInput = document.getElementById('ai-query');
const sendQueryBtn = document.getElementById('send-query');
const aiThinking = document.getElementById('ai-thinking');
const aiResponseContainer = document.getElementById('ai-response-container');
const aiResponse = document.getElementById('ai-response');
const aiError = document.getElementById('ai-error');
const aiErrorMessage = document.getElementById('ai-error-message');
const refineQueryBtn = document.getElementById('refine-query');
sendQueryBtn.addEventListener('click', handleAIQuery);
aiQueryInput.addEventListener('keypress', (e) => {
if (e.key === 'Enter') handleAIQuery();
});
refineQueryBtn.addEventListener('click', () => {
aiResponseContainer.classList.add('hidden');
aiQueryInput.focus();
});
function handleAIQuery() {
const query = aiQueryInput.value.trim();
if (!query) return;
// Show thinking indicator
aiThinking.classList.remove('hidden');
aiResponseContainer.classList.add('hidden');
aiError.classList.add('hidden');
// In a real app, this would be an actual API call to Cloudflare AI Gateway
// For demo purposes, we'll simulate a response after a delay
setTimeout(() => {
aiThinking.classList.add('hidden');
// Simulate success or error randomly
if (Math.random() > 0.2) { // 80% chance of success
// Generate a plausible AI response
const responses = [
`Based on your memories, you visited a charming French bistro called "Le Petit Jardin" in Paris on June 15, 2022. The meal included duck confit and a bottle of Bordeaux wine. You mentioned the service was exceptional.`,
`Your memory fragments show a restaurant with red awnings and outdoor seating. The name "Chez Marie" appears in one of your photos from that trip. You were there with two friends around 7:30 PM.`,
`I found references to a Parisian restaurant in your audio recordings from last year. You described it as having "the best onion soup" and located near the Eiffel Tower. The receipt shows you paid €85 for three people.`
];
aiResponse.textContent = responses[Math.floor(Math.random() * responses.length)];
aiResponseContainer.classList.remove('hidden');
} else {
// Simulate error
aiErrorMessage.textContent = "Could not connect to AI service. Please try again later.";
aiError.classList.remove('hidden');
}
}, 1500 + Math.random() * 2000); // Random delay between 1.5-3.5 seconds
}
// AI Processing Demo
const demoProcessingBtn = document.getElementById('demo-processing');
const transcriptionResult = document.getElementById('transcription-result');
const visualResult = document.getElementById('visual-result');
const linkingResult = document.getElementById('linking-result');
const memoryObjectDemo = document.getElementById('memory-object-demo');
const memoryTranscription = document.getElementById('memory-transcription');
const memoryEntities = document.getElementById('memory-entities');
const memoryLinks = document.getElementById('memory-links');
const memoryTimestamp = document.getElementById('memory-timestamp');
demoProcessingBtn.addEventListener('click', runProcessingDemo);
function runProcessingDemo() {
// Reset previous demo
transcriptionResult.classList.add('hidden');
visualResult.classList.add('hidden');
linkingResult.classList.add('hidden');
memoryObjectDemo.classList.add('hidden');
// Disable button during demo
demoProcessingBtn.disabled = true;
demoProcessingBtn.innerHTML = '<i class="fas fa-cog fa-spin mr-2"></i> Processing...';
// Simulate transcription step
setTimeout(() => {
transcriptionResult.textContent = '"We had an amazing dinner at Le Petit Jardin last night. The duck confit was incredible!"';
transcriptionResult.classList.remove('hidden');
// Simulate visual analysis step
setTimeout(() => {
visualResult.innerHTML = `
<div class="flex flex-wrap gap-1">
<span class="px-2 py-1 bg-purple-100 text-purple-800 text-xs rounded">Restaurant</span>
<span class="px-2 py-1 bg-purple-100 text-purple-800 text-xs rounded">Duck dish</span>
<span class="px-2 py-1 bg-purple-100 text-purple-800 text-xs rounded">Wine bottle</span>
<span class="px-2 py-1 bg-purple-100 text-purple-800 text-xs rounded">2 people</span>
</div>
`;
visualResult.classList.remove('hidden');
// Simulate context linking step
setTimeout(() => {
linkingResult.innerHTML = `
<div class="text-center">
<div class="inline-block px-3 py-1 bg-blue-100 text-blue-800 text-xs rounded-full">
<i class="fas fa-link mr-1"></i> Matched location
</div>
<div class="mt-1 text-xs">Paris, France</div>
</div>
`;
linkingResult.classList.remove('hidden');
// Show final memory object
setTimeout(() => {
memoryTranscription.textContent = '"We had an amazing dinner at Le Petit Jardin last night. The duck confit was incredible!"';
memoryEntities.innerHTML = `
<div class="flex flex-wrap gap-1">
<span class="px-2 py-1 bg-purple-100 text-purple-800 text-xs rounded">Restaurant</span>
<span class="px-2 py-1 bg-purple-100 text-purple-800 text-xs rounded">Duck dish</span>
<span class="px-2 py-1 bg-purple-100 text-purple-800 text-xs rounded">Wine bottle</span>
<span class="px-2 py-1 bg-purple-100 text-purple-800 text-xs rounded">2 people</span>
</div>
`;
memoryLinks.innerHTML = `
<div class="space-y-1">
<div class="flex items-center">
<i class="fas fa-map-marker-alt text-blue-500 mr-2 text-xs"></i>
<span class="text-xs">Le Petit Jardin, Paris</span>
</div>
<div class="flex items-center">
<i class="fas fa-utensils text-blue-500 mr-2 text-xs"></i>
<span class="text-xs">Duck confit mentioned in audio</span>
</div>
<div class="flex items-center">
<i class="fas fa-user-friends text-blue-500 mr-2 text-xs"></i>
<span class="text-xs">Dining companion: Sarah</span>
</div>
</div>
`;
memoryTimestamp.textContent = new Date().toLocaleDateString() + ' ' + new Date().toLocaleTimeString([], {hour: '2-digit', minute:'2-digit'});
memoryObjectDemo.classList.remove('hidden');
// Re-enable button
demoProcessingBtn.disabled = false;
demoProcessingBtn.innerHTML = '<i class="fas fa-play-circle mr-2"></i> Run Processing Demo';
}, 800);
}, 800);
}, 800);
}, 800);
}
});
</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=privateuserh/aurarecall1" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>