aig / index.html
Teleadmin's picture
Add 2 files
e799e79 verified
<!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>