Spaces:
Sleeping
Sleeping
Create index.html
Browse files- index.html +83 -0
index.html
ADDED
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html lang="es">
|
3 |
+
<head>
|
4 |
+
<meta charset="UTF-8">
|
5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
+
<title>BITER API - Hugging Face Space</title>
|
7 |
+
<style>
|
8 |
+
body {
|
9 |
+
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
|
10 |
+
max-width: 800px;
|
11 |
+
margin: 0 auto;
|
12 |
+
padding: 20px;
|
13 |
+
line-height: 1.6;
|
14 |
+
color: #333;
|
15 |
+
}
|
16 |
+
h1 {
|
17 |
+
color: #1a1a1a;
|
18 |
+
border-bottom: 2px solid #eee;
|
19 |
+
padding-bottom: 10px;
|
20 |
+
}
|
21 |
+
.card {
|
22 |
+
background: #f9f9f9;
|
23 |
+
border-radius: 8px;
|
24 |
+
padding: 20px;
|
25 |
+
margin: 20px 0;
|
26 |
+
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
27 |
+
}
|
28 |
+
code {
|
29 |
+
background: #eee;
|
30 |
+
padding: 2px 5px;
|
31 |
+
border-radius: 3px;
|
32 |
+
font-family: monospace;
|
33 |
+
}
|
34 |
+
.endpoint {
|
35 |
+
background: #e9f5ff;
|
36 |
+
border-left: 4px solid #0070f3;
|
37 |
+
}
|
38 |
+
</style>
|
39 |
+
</head>
|
40 |
+
<body>
|
41 |
+
<h1>BITER - API de Asistente IA para Emprendedores</h1>
|
42 |
+
|
43 |
+
<div class="card">
|
44 |
+
<h2>Estado del Servicio</h2>
|
45 |
+
<p>✅ API activa y funcionando</p>
|
46 |
+
<p>Modelo: Zephyr-7B</p>
|
47 |
+
</div>
|
48 |
+
|
49 |
+
<div class="card endpoint">
|
50 |
+
<h2>Endpoint de la API</h2>
|
51 |
+
<p>URL: <code>POST /generate</code></p>
|
52 |
+
<p>Formato de solicitud:</p>
|
53 |
+
<pre><code>{
|
54 |
+
"message": "Tu pregunta sobre emprendimiento aquí"
|
55 |
+
}</code></pre>
|
56 |
+
<p>Formato de respuesta:</p>
|
57 |
+
<pre><code>{
|
58 |
+
"response": "Respuesta generada por BITER"
|
59 |
+
}</code></pre>
|
60 |
+
</div>
|
61 |
+
|
62 |
+
<div class="card">
|
63 |
+
<h2>Integración con tu Web</h2>
|
64 |
+
<p>Para integrar BITER en justbyte.es, usa este código en tu archivo chat.php:</p>
|
65 |
+
<pre><code>// Ejemplo de código para enviar solicitud a la API
|
66 |
+
fetch('https://tu-usuario-huggingface.hf.space/generate', {
|
67 |
+
method: 'POST',
|
68 |
+
headers: {
|
69 |
+
'Content-Type': 'application/json',
|
70 |
+
},
|
71 |
+
body: JSON.stringify({
|
72 |
+
message: preguntaDelUsuario
|
73 |
+
})
|
74 |
+
})
|
75 |
+
.then(response => response.json())
|
76 |
+
.then(data => {
|
77 |
+
// Mostrar la respuesta en tu interfaz
|
78 |
+
mostrarRespuesta(data.response);
|
79 |
+
});</code></pre>
|
80 |
+
</div>
|
81 |
+
</body>
|
82 |
+
</html>
|
83 |
+
|