File size: 14,570 Bytes
e799e79 | 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 | <!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Assistant IA | Hugging Face</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>
@keyframes float {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-10px); }
}
.floating {
animation: float 3s ease-in-out infinite;
}
.gradient-bg {
background: linear-gradient(135deg, #6e8efb 0%, #a777e3 100%);
}
.message-entering {
animation: messageEnter 0.3s ease-out forwards;
}
@keyframes messageEnter {
from { opacity: 0; transform: translateY(10px); }
to { opacity: 1; transform: translateY(0); }
}
</style>
</head>
<body class="bg-gray-50 min-h-screen flex flex-col">
<!-- Header -->
<header class="gradient-bg text-white shadow-lg">
<div class="container mx-auto px-4 py-6">
<div class="flex justify-between items-center">
<div class="flex items-center space-x-3">
<i class="fas fa-robot text-3xl"></i>
<h1 class="text-2xl font-bold">Assistant IA</h1>
</div>
<div class="flex items-center space-x-4">
<span class="hidden md:inline-block px-3 py-1 bg-white bg-opacity-20 rounded-full text-sm">Hugging Face Space</span>
<button class="px-4 py-2 bg-white text-purple-600 rounded-full font-semibold hover:bg-gray-100 transition">
<i class="fas fa-rocket mr-2"></i>Déployer
</button>
</div>
</div>
</div>
</header>
<!-- Main Content -->
<main class="flex-grow container mx-auto px-4 py-8 flex flex-col md:flex-row">
<!-- Presentation Section -->
<div class="md:w-1/3 lg:w-1/4 mb-8 md:mb-0 md:pr-8">
<div class="bg-white rounded-xl shadow-md p-6 sticky top-8">
<div class="text-center mb-6">
<div class="floating inline-block mb-4">
<div class="w-32 h-32 rounded-full gradient-bg flex items-center justify-center mx-auto">
<i class="fas fa-robot text-white text-5xl"></i>
</div>
</div>
<h2 class="text-xl font-bold text-gray-800">Assistant IA</h2>
<p class="text-purple-600 font-medium">Spécialiste en développement</p>
</div>
<div class="space-y-4">
<div class="flex items-start space-x-3">
<i class="fas fa-info-circle text-purple-500 mt-1"></i>
<div>
<h3 class="font-semibold text-gray-700">À propos</h3>
<p class="text-gray-600 text-sm">Assistant IA spécialisé dans le développement web et le déploiement sur Hugging Face Spaces.</p>
</div>
</div>
<div class="flex items-start space-x-3">
<i class="fas fa-cogs text-purple-500 mt-1"></i>
<div>
<h3 class="font-semibold text-gray-700">Capacités</h3>
<ul class="text-gray-600 text-sm list-disc pl-4 space-y-1">
<li>Création d'interfaces HTML/CSS/JS</li>
<li>Intégration avec Hugging Face</li>
<li>Conseils en déploiement</li>
<li>Optimisation UI/UX</li>
</ul>
</div>
</div>
<div class="flex items-start space-x-3">
<i class="fas fa-bolt text-purple-500 mt-1"></i>
<div>
<h3 class="font-semibold text-gray-700">Technologies</h3>
<div class="flex flex-wrap gap-2 mt-1">
<span class="px-2 py-1 bg-purple-100 text-purple-800 rounded-full text-xs">HTML5</span>
<span class="px-2 py-1 bg-purple-100 text-purple-800 rounded-full text-xs">CSS3</span>
<span class="px-2 py-1 bg-purple-100 text-purple-800 rounded-full text-xs">JavaScript</span>
<span class="px-2 py-1 bg-purple-100 text-purple-800 rounded-full text-xs">Tailwind</span>
<span class="px-2 py-1 bg-purple-100 text-purple-800 rounded-full text-xs">Hugging Face</span>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Chat Section -->
<div class="md:w-2/3 lg:w-3/4 bg-white rounded-xl shadow-md overflow-hidden flex flex-col">
<div class="p-6 border-b">
<h2 class="text-xl font-bold text-gray-800">Conversation</h2>
<p class="text-gray-600 text-sm">Posez-moi vos questions sur le déploiement Hugging Face</p>
</div>
<div id="chat-container" class="flex-grow p-4 overflow-y-auto bg-gray-50" style="min-height: 300px;">
<!-- Messages will appear here -->
<div id="welcome-message" class="message-entering">
<div class="flex mb-4">
<div class="w-10 h-10 rounded-full gradient-bg flex items-center justify-center mr-3">
<i class="fas fa-robot text-white"></i>
</div>
<div class="max-w-3/4">
<div class="bg-white p-4 rounded-lg shadow-sm border border-gray-200">
<p class="text-gray-800">Bonjour ! 👋 Je suis un assistant IA spécialisé dans le développement web et le déploiement sur Hugging Face Spaces.</p>
<p class="text-gray-800 mt-2">Comme vous l'avez découvert, je peux être déployé directement dans un Space Hugging Face pour créer des applications interactives d'IA.</p>
<div class="mt-4 p-3 bg-purple-50 rounded-lg border border-purple-100">
<h4 class="font-semibold text-purple-800 mb-2">Ce que je peux faire pour vous :</h4>
<ul class="list-disc pl-5 space-y-1 text-sm text-purple-700">
<li>Créer des interfaces web élégantes avec HTML/CSS/JS</li>
<li>Vous aider à déployer des applications sur Hugging Face</li>
<li>Concevoir des démonstrations interactives d'IA</li>
<li>Optimiser l'expérience utilisateur de vos projets</li>
</ul>
</div>
<p class="text-gray-800 mt-4">Comment puis-je vous aider aujourd'hui ? 😊</p>
</div>
<div class="text-xs text-gray-500 mt-1 ml-1">Aujourd'hui à <span id="current-time"></span></div>
</div>
</div>
</div>
</div>
<div class="p-4 border-t bg-white">
<div class="flex space-x-2">
<input type="text" id="user-input" placeholder="Écrivez votre message..." class="flex-grow px-4 py-2 border rounded-full focus:outline-none focus:ring-2 focus:ring-purple-300">
<button id="send-btn" class="w-12 h-12 rounded-full gradient-bg text-white flex items-center justify-center hover:opacity-90 transition">
<i class="fas fa-paper-plane"></i>
</button>
</div>
<div class="flex justify-center mt-3 space-x-4">
<button class="text-xs text-purple-600 hover:text-purple-800 flex items-center">
<i class="fas fa-lightbulb mr-1"></i> Suggestions
</button>
<button class="text-xs text-purple-600 hover:text-purple-800 flex items-center">
<i class="fas fa-trash-alt mr-1"></i> Effacer
</button>
</div>
</div>
</div>
</main>
<!-- Footer -->
<footer class="bg-gray-800 text-white py-6">
<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-xl"></i>
<span class="font-bold">Assistant IA</span>
</div>
<p class="text-gray-400 text-sm mt-1">Déployé sur Hugging Face Spaces</p>
</div>
<div class="flex space-x-6">
<a href="#" class="text-gray-400 hover:text-white transition">
<i class="fab fa-github text-xl"></i>
</a>
<a href="#" class="text-gray-400 hover:text-white transition">
<i class="fab fa-twitter text-xl"></i>
</a>
<a href="#" class="text-gray-400 hover:text-white transition">
<i class="fab fa-discord text-xl"></i>
</a>
</div>
</div>
<div class="mt-6 pt-4 border-t border-gray-700 text-center text-gray-400 text-sm">
<p>© 2023 Assistant IA. Tous droits réservés.</p>
</div>
</div>
</footer>
<script>
// Set current time
const now = new Date();
const timeString = now.toLocaleTimeString('fr-FR', { hour: '2-digit', minute: '2-digit' });
document.getElementById('current-time').textContent = timeString;
// Simple chat interaction
document.getElementById('send-btn').addEventListener('click', sendMessage);
document.getElementById('user-input').addEventListener('keypress', function(e) {
if (e.key === 'Enter') sendMessage();
});
function sendMessage() {
const userInput = document.getElementById('user-input');
const message = userInput.value.trim();
if (message) {
// Add user message
addMessage(message, 'user');
userInput.value = '';
// Simulate AI response after a short delay
setTimeout(() => {
const responses = [
"Je comprends votre demande concernant le déploiement sur Hugging Face. Pouvez-vous préciser quels aspects vous intéressent particulièrement ?",
"Le déploiement sur Hugging Face Spaces est effectivement très simple. Il suffit de créer un nouveau Space et d'y ajouter votre code.",
"Pour une interface comme celle-ci, vous auriez besoin de créer un fichier HTML avec le code que vous voyez, puis de le déployer dans un Space de type 'Static'.",
"Je peux vous guider étape par étape pour créer et déployer votre propre application. Qu'aimeriez-vous savoir en particulier ?"
];
const randomResponse = responses[Math.floor(Math.random() * responses.length)];
addMessage(randomResponse, 'ai');
}, 1000 + Math.random() * 2000);
}
}
function addMessage(text, sender) {
const chatContainer = document.getElementById('chat-container');
const now = new Date();
const timeString = now.toLocaleTimeString('fr-FR', { hour: '2-digit', minute: '2-digit' });
const messageDiv = document.createElement('div');
messageDiv.className = 'message-entering';
messageDiv.innerHTML = `
<div class="flex mb-4 ${sender === 'user' ? 'justify-end' : ''}">
${sender === 'ai' ? `
<div class="w-10 h-10 rounded-full gradient-bg flex items-center justify-center mr-3">
<i class="fas fa-robot text-white"></i>
</div>
` : ''}
<div class="max-w-3/4">
<div class="${sender === 'ai' ? 'bg-white' : 'gradient-bg text-white'} p-4 rounded-lg shadow-sm ${sender === 'ai' ? 'border border-gray-200' : ''}">
<p>${text}</p>
</div>
<div class="text-xs text-gray-500 mt-1 ${sender === 'ai' ? 'ml-1' : 'mr-1 text-right'}">Aujourd'hui à ${timeString}</div>
</div>
${sender === 'user' ? `
<div class="w-10 h-10 rounded-full bg-gray-200 flex items-center justify-center ml-3">
<i class="fas fa-user text-gray-600"></i>
</div>
` : ''}
</div>
`;
chatContainer.appendChild(messageDiv);
chatContainer.scrollTop = chatContainer.scrollHeight;
}
</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=Teleadmin/aig" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html> |