Subir archivos a "/"
This commit is contained in:
+102
@@ -0,0 +1,102 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>SRag | Efficient Retrieval-Augmented Generation</title>
|
||||||
|
|
||||||
|
<meta name="description" content="SRag is a modern and lightweight RAG (Retrieval-Augmented Generation) implementation designed for efficient document parsing and contextual AI queries.">
|
||||||
|
<meta name="author" content="Juan Raul Rodriguez Gil">
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="styles.css">
|
||||||
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||||
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&family=Fira+Code&display=swap" rel="stylesheet">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="container">
|
||||||
|
|
||||||
|
<section class="hero">
|
||||||
|
<div class="badge" id="hero-badge">AI / RAG Architecture</div>
|
||||||
|
<h1 id="hero-title">SRag</h1>
|
||||||
|
<p id="hero-desc">A modern, lightweight implementation for Retrieval-Augmented Generation. SRag streamlines the connection between your document embeddings and Large Language Models.</p>
|
||||||
|
|
||||||
|
<div class="hero-buttons">
|
||||||
|
<a href="https://github.com/jrodriiguezg/SRag" target="_blank" rel="noopener noreferrer" class="btn btn-primary">
|
||||||
|
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor"><path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/></svg>
|
||||||
|
View on GitHub
|
||||||
|
</a>
|
||||||
|
<a href="https://jrodriiguezg.link" class="btn btn-secondary">Back to Portfolio</a>
|
||||||
|
<a href="https://ko-fi.com/jrodriiguezg" target="_blank" rel="noopener noreferrer" class="btn btn-kofi">
|
||||||
|
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor"><path d="M23.881 8.948c-.773-4.085-4.859-4.593-4.859-4.593H.723c-.604 0-.679.798-.679.798s-.082 7.324-.022 11.822c.164 2.424 2.586 2.672 2.586 2.672s8.267-.023 11.966-.049c2.438-.426 2.683-2.566 2.658-3.734 4.352.24 7.422-2.831 6.649-6.916zm-11.062 3.511c-1.246 1.453-4.011 3.976-4.011 3.976s-.121.119-.31.023c-.076-.057-.108-.09-.108-.09-.443-.441-3.368-3.049-4.051-3.954-1.094-1.465-1.083-3.262 0-4.198 1.116-.916 2.79-.843 3.995.212.352.312.593.636.593.636s.202-.308.514-.6A4.331 4.331 0 0 1 12.87 8.07c1.196-.906 2.87-.978 3.996-.061 1.083.936 1.094 2.733 0 4.198z"/></svg>
|
||||||
|
Support on Ko-fi
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<div class="content-section">
|
||||||
|
|
||||||
|
<section class="glass-panel">
|
||||||
|
<h2 class="section-title">How it Works</h2>
|
||||||
|
<div class="grid-2">
|
||||||
|
<div>
|
||||||
|
<p style="color: var(--text-secondary); margin-bottom: 1rem;">SRag simplifies the vectorization pipeline. It ingests your data, creates optimized embeddings, and provides a clean API for semantic retrieval.</p>
|
||||||
|
<ul class="tech-list">
|
||||||
|
<li><strong>Ingestion Engine:</strong> Automatically parses text, PDFs, and Markdown files into manageable chunks.</li>
|
||||||
|
<li><strong>Vectorization:</strong> Generates dense embeddings optimized for rapid semantic search.</li>
|
||||||
|
<li><strong>Query Router:</strong> Intercepts user prompts, retrieves relevant context, and augments the LLM input seamlessly.</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="code-block">
|
||||||
|
<span class="code-keyword">import</span> os
|
||||||
|
<span class="code-keyword">from</span> llama_index.core <span class="code-keyword">import</span> VectorStoreIndex, SimpleDirectoryReader, Settings
|
||||||
|
<span class="code-keyword">from</span> llama_index.llms.ollama <span class="code-keyword">import</span> Ollama
|
||||||
|
<span class="code-keyword">from</span> llama_index.embeddings.ollama <span class="code-keyword">import</span> OllamaEmbedding
|
||||||
|
|
||||||
|
<span class="code-comment"># Setup local models via Ollama</span>
|
||||||
|
Settings.llm = Ollama(model=<span class="code-string">"qwen2.5:7b"</span>, request_timeout=120.0)
|
||||||
|
Settings.embed_model = OllamaEmbedding(model_name=<span class="code-string">"nomic-embed-text"</span>)
|
||||||
|
|
||||||
|
<span class="code-comment"># Load documents and generate vector index</span>
|
||||||
|
documents = SimpleDirectoryReader(<span class="code-string">"docs"</span>).load_data()
|
||||||
|
index = VectorStoreIndex.from_documents(documents)
|
||||||
|
|
||||||
|
<span class="code-comment"># Initialize strict context-based chat engine</span>
|
||||||
|
chat_engine = index.as_chat_engine(
|
||||||
|
chat_mode=<span class="code-string">"context"</span>,
|
||||||
|
similarity_top_k=20,
|
||||||
|
verbose=False
|
||||||
|
)
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="glass-panel">
|
||||||
|
<h2 class="section-title">Core Architecture</h2>
|
||||||
|
<div class="hardware-grid">
|
||||||
|
<div class="hardware-card">
|
||||||
|
<h4>Embeddings</h4>
|
||||||
|
<p>Support for local models via HuggingFace or external APIs like OpenAI.</p>
|
||||||
|
</div>
|
||||||
|
<div class="hardware-card">
|
||||||
|
<h4>Vector DB</h4>
|
||||||
|
<p>Lightweight and in-memory persistent storage for ultra-fast document retrieval.</p>
|
||||||
|
</div>
|
||||||
|
<div class="hardware-card">
|
||||||
|
<h4>LLM Agnostic</h4>
|
||||||
|
<p>Compatible with Ollama for local inference or any standard API backend.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
<p>© 2026 Juan Raul Rodriguez Gil. Built with passion for Linux & AI. <br>
|
||||||
|
<a href="https://jrodriiguezg.link" class="footer-link">jrodriiguezg.link</a> |
|
||||||
|
<a href="https://www.instagram.com/jrodriiguezg.link/?hl=es" target="_blank" rel="noopener noreferrer" class="footer-link">Instagram</a>
|
||||||
|
</p>
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
+267
@@ -0,0 +1,267 @@
|
|||||||
|
:root {
|
||||||
|
--bg-main: #0f1115;
|
||||||
|
--bg-secondary: #1a1d24;
|
||||||
|
--bg-tertiary: #232730;
|
||||||
|
--text-primary: #f8fafc;
|
||||||
|
--text-secondary: #94a3b8;
|
||||||
|
|
||||||
|
/* Nueva Paleta Rosa para SRag */
|
||||||
|
--accent-color: #ec4899; /* Rosa vibrante principal */
|
||||||
|
--accent-hover: #db2777; /* Rosa más oscuro para hover */
|
||||||
|
|
||||||
|
--border-color: #2e3340;
|
||||||
|
--glass-bg: rgba(26, 29, 36, 0.4);
|
||||||
|
--glass-border: rgba(255, 255, 255, 0.08);
|
||||||
|
}
|
||||||
|
|
||||||
|
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||||||
|
|
||||||
|
body {
|
||||||
|
font-family: 'Inter', -apple-system, sans-serif;
|
||||||
|
background-color: var(--bg-main);
|
||||||
|
color: var(--text-primary);
|
||||||
|
line-height: 1.6;
|
||||||
|
min-height: 100vh;
|
||||||
|
overflow-x: hidden;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Efecto de gradiente de fondo (Rosa a Morado) */
|
||||||
|
body::before, body::after {
|
||||||
|
content: '';
|
||||||
|
position: fixed;
|
||||||
|
border-radius: 50%;
|
||||||
|
filter: blur(120px);
|
||||||
|
z-index: -1;
|
||||||
|
opacity: 0.15;
|
||||||
|
pointer-events: none;
|
||||||
|
animation: drift 20s infinite alternate;
|
||||||
|
}
|
||||||
|
|
||||||
|
body::before {
|
||||||
|
width: 600px;
|
||||||
|
height: 600px;
|
||||||
|
background: var(--accent-color); /* Blob Rosa */
|
||||||
|
top: -200px;
|
||||||
|
left: -200px;
|
||||||
|
}
|
||||||
|
|
||||||
|
body::after {
|
||||||
|
width: 500px;
|
||||||
|
height: 500px;
|
||||||
|
background: #8b5cf6; /* Blob Morado mantenido para el gradiente */
|
||||||
|
bottom: -100px;
|
||||||
|
right: -150px;
|
||||||
|
animation-delay: -5s;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes drift {
|
||||||
|
0% { transform: translate(0, 0); }
|
||||||
|
100% { transform: translate(100px, 100px); }
|
||||||
|
}
|
||||||
|
|
||||||
|
.container { max-width: 1200px; margin: 0 auto; padding: 4rem 2rem; }
|
||||||
|
|
||||||
|
/* Hero */
|
||||||
|
.hero { text-align: center; margin-bottom: 5rem; padding: 4rem 0; }
|
||||||
|
|
||||||
|
.badge {
|
||||||
|
display: inline-block;
|
||||||
|
padding: 0.4rem 1rem;
|
||||||
|
background: rgba(236, 72, 153, 0.1); /* Resplandor rosa tenue */
|
||||||
|
color: var(--accent-color);
|
||||||
|
border-radius: 20px;
|
||||||
|
font-size: 0.85rem;
|
||||||
|
font-weight: 600;
|
||||||
|
margin-bottom: 1.5rem;
|
||||||
|
border: 1px solid rgba(236, 72, 153, 0.2);
|
||||||
|
letter-spacing: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hero h1 {
|
||||||
|
font-size: 4rem;
|
||||||
|
font-weight: 800;
|
||||||
|
letter-spacing: -2px;
|
||||||
|
margin-bottom: 1.5rem;
|
||||||
|
background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
|
||||||
|
-webkit-background-clip: text;
|
||||||
|
-webkit-text-fill-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hero p {
|
||||||
|
font-size: 1.25rem;
|
||||||
|
color: var(--text-secondary);
|
||||||
|
max-width: 700px;
|
||||||
|
margin: 0 auto 2.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hero-buttons { display: flex; justify-content: center; gap: 1rem; }
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.5rem;
|
||||||
|
padding: 0.8rem 1.8rem;
|
||||||
|
border-radius: 8px;
|
||||||
|
font-weight: 600;
|
||||||
|
text-decoration: none;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
font-size: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-primary {
|
||||||
|
background-color: var(--accent-color);
|
||||||
|
color: #fff;
|
||||||
|
border: 1px solid var(--accent-color);
|
||||||
|
box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3); /* Sombra rosa */
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-primary:hover {
|
||||||
|
background-color: var(--accent-hover);
|
||||||
|
transform: translateY(-2px);
|
||||||
|
box-shadow: 0 6px 20px rgba(236, 72, 153, 0.4);
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-secondary {
|
||||||
|
background-color: var(--glass-bg);
|
||||||
|
color: var(--text-primary);
|
||||||
|
border: 1px solid var(--border-color);
|
||||||
|
backdrop-filter: blur(10px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-secondary:hover {
|
||||||
|
background-color: var(--bg-tertiary);
|
||||||
|
border-color: var(--text-secondary);
|
||||||
|
transform: translateY(-2px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-kofi {
|
||||||
|
background-color: var(--glass-bg);
|
||||||
|
color: var(--text-primary);
|
||||||
|
border: 1px solid var(--border-color);
|
||||||
|
backdrop-filter: blur(10px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-kofi:hover {
|
||||||
|
background-color: rgba(236, 72, 153, 0.1);
|
||||||
|
border-color: var(--accent-color);
|
||||||
|
color: var(--accent-color);
|
||||||
|
transform: translateY(-2px);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Glass Panels */
|
||||||
|
.glass-panel {
|
||||||
|
background: var(--glass-bg);
|
||||||
|
backdrop-filter: blur(12px);
|
||||||
|
-webkit-backdrop-filter: blur(12px);
|
||||||
|
border: 1px solid var(--glass-border);
|
||||||
|
border-radius: 16px;
|
||||||
|
padding: 3rem;
|
||||||
|
margin-bottom: 4rem;
|
||||||
|
transition: transform 0.3s ease, border-color 0.3s ease;
|
||||||
|
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.glass-panel:hover {
|
||||||
|
border-color: rgba(255, 255, 255, 0.15);
|
||||||
|
transform: translateY(-2px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.section-title {
|
||||||
|
font-size: 2rem;
|
||||||
|
margin-bottom: 2rem;
|
||||||
|
color: var(--text-primary);
|
||||||
|
font-weight: 700;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section-title::after {
|
||||||
|
content: '';
|
||||||
|
flex: 1;
|
||||||
|
height: 1px;
|
||||||
|
background: linear-gradient(90deg, var(--border-color) 0%, transparent 100%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
|
||||||
|
|
||||||
|
.tech-list { list-style: none; margin-top: 1.5rem; }
|
||||||
|
.tech-list li {
|
||||||
|
position: relative;
|
||||||
|
padding-left: 1.5rem;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
color: var(--text-secondary);
|
||||||
|
font-size: 1.05rem;
|
||||||
|
line-height: 1.6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tech-list li::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0.5rem;
|
||||||
|
width: 8px;
|
||||||
|
height: 8px;
|
||||||
|
background: var(--accent-color);
|
||||||
|
border-radius: 50%;
|
||||||
|
box-shadow: 0 0 10px var(--accent-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.code-block {
|
||||||
|
background-color: #0d0f12;
|
||||||
|
padding: 1.5rem;
|
||||||
|
border-radius: 8px;
|
||||||
|
font-family: 'Fira Code', monospace;
|
||||||
|
font-size: 0.9rem;
|
||||||
|
color: #e2e8f0;
|
||||||
|
border: 1px solid var(--border-color);
|
||||||
|
overflow-x: auto;
|
||||||
|
white-space: pre-wrap;
|
||||||
|
word-break: break-word;
|
||||||
|
}
|
||||||
|
.code-comment { color: #64748b; }
|
||||||
|
.code-keyword { color: #c678dd; }
|
||||||
|
.code-string { color: #98c379; }
|
||||||
|
|
||||||
|
/* Features Grid */
|
||||||
|
.hardware-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(3, 1fr);
|
||||||
|
gap: 1.5rem;
|
||||||
|
margin-top: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hardware-card {
|
||||||
|
background: var(--bg-secondary);
|
||||||
|
border: 1px solid var(--border-color);
|
||||||
|
border-radius: 12px;
|
||||||
|
padding: 1.5rem;
|
||||||
|
text-align: center;
|
||||||
|
transition: all 0.3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hardware-card:hover {
|
||||||
|
border-color: var(--accent-color);
|
||||||
|
background: var(--bg-tertiary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.hardware-card h4 { color: var(--text-primary); margin-bottom: 0.5rem; font-size: 1.1rem; }
|
||||||
|
.hardware-card p { color: var(--text-secondary); font-size: 0.9rem; }
|
||||||
|
|
||||||
|
footer {
|
||||||
|
text-align: center;
|
||||||
|
color: var(--text-secondary);
|
||||||
|
font-size: 0.9rem;
|
||||||
|
padding: 3rem 0 2rem;
|
||||||
|
border-top: 1px solid var(--border-color);
|
||||||
|
margin-top: 5rem;
|
||||||
|
}
|
||||||
|
.footer-link { color: var(--accent-color); text-decoration: none; transition: color 0.3s; }
|
||||||
|
.footer-link:hover { color: var(--text-primary); }
|
||||||
|
|
||||||
|
@media (max-width: 900px) {
|
||||||
|
.grid-2, .hardware-grid { grid-template-columns: 1fr; }
|
||||||
|
.hero h1 { font-size: 3rem; }
|
||||||
|
.glass-panel { padding: 2rem; }
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user