biter-zephyr / index.html
askbyte's picture
Create index.html
fea29de verified
raw
history blame
2.34 kB
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>BITER API - Hugging Face Space</title>
<style>
body {
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
max-width: 800px;
margin: 0 auto;
padding: 20px;
line-height: 1.6;
color: #333;
}
h1 {
color: #1a1a1a;
border-bottom: 2px solid #eee;
padding-bottom: 10px;
}
.card {
background: #f9f9f9;
border-radius: 8px;
padding: 20px;
margin: 20px 0;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
code {
background: #eee;
padding: 2px 5px;
border-radius: 3px;
font-family: monospace;
}
.endpoint {
background: #e9f5ff;
border-left: 4px solid #0070f3;
}
</style>
</head>
<body>
<h1>BITER - API de Asistente IA para Emprendedores</h1>
<div class="card">
<h2>Estado del Servicio</h2>
<p>✅ API activa y funcionando</p>
<p>Modelo: Zephyr-7B</p>
</div>
<div class="card endpoint">
<h2>Endpoint de la API</h2>
<p>URL: <code>POST /generate</code></p>
<p>Formato de solicitud:</p>
<pre><code>{
"message": "Tu pregunta sobre emprendimiento aquí"
}</code></pre>
<p>Formato de respuesta:</p>
<pre><code>{
"response": "Respuesta generada por BITER"
}</code></pre>
</div>
<div class="card">
<h2>Integración con tu Web</h2>
<p>Para integrar BITER en justbyte.es, usa este código en tu archivo chat.php:</p>
<pre><code>// Ejemplo de código para enviar solicitud a la API
fetch('https://tu-usuario-huggingface.hf.space/generate', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
message: preguntaDelUsuario
})
})
.then(response => response.json())
.then(data => {
// Mostrar la respuesta en tu interfaz
mostrarRespuesta(data.response);
});</code></pre>
</div>
</body>
</html>