Gabriel Galán commited on
Commit
d5be6a0
·
verified ·
1 Parent(s): c2fc392

Upload index.html with huggingface_hub

Browse files
Files changed (1) hide show
  1. index.html +200 -18
index.html CHANGED
@@ -1,19 +1,201 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  </html>
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>HFL HuggingFace Local</title>
7
+ <style>
8
+ :root {
9
+ --bg: #0d1117; --surface: #161b22; --surface2: #21262d; --border: #30363d;
10
+ --text: #c9d1d9; --text-muted: #8b949e; --accent: #58a6ff; --green: #3fb950;
11
+ --yellow: #d29922; --red: #f85149; --purple: #bc8cff; --orange: #f0883e;
12
+ }
13
+ * { margin: 0; padding: 0; box-sizing: border-box; }
14
+ body { background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; line-height: 1.6; }
15
+ .container { max-width: 900px; margin: 0 auto; padding: 2rem; }
16
+ .hero { text-align: center; padding: 3rem 0 2rem; }
17
+ .hero h1 { font-size: 2.8rem; background: linear-gradient(135deg, var(--accent), var(--purple)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 0.5rem; }
18
+ .hero .subtitle { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 1.5rem; }
19
+ .badges { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; margin-bottom: 2rem; }
20
+ .badges span { background: var(--surface); padding: 0.3rem 0.8rem; border-radius: 6px; font-size: 0.85rem; border: 1px solid var(--border); }
21
+ .cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin: 2rem 0; }
22
+ .cta a { display: inline-block; padding: 0.7rem 1.5rem; border-radius: 8px; text-decoration: none; font-weight: 600; font-size: 0.95rem; transition: opacity 0.2s; }
23
+ .cta a:hover { opacity: 0.85; }
24
+ .cta-primary { background: var(--accent); color: #fff; }
25
+ .cta-secondary { background: var(--surface2); color: var(--text); border: 1px solid var(--border); }
26
+ section { margin: 2.5rem 0; }
27
+ h2 { font-size: 1.5rem; color: var(--accent); margin-bottom: 1rem; padding-bottom: 0.3rem; border-bottom: 2px solid var(--border); }
28
+ h3 { font-size: 1.1rem; color: var(--green); margin: 1.2rem 0 0.5rem; }
29
+ p { margin-bottom: 0.8rem; }
30
+ .card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 1.2rem; margin-bottom: 0.8rem; }
31
+ .card h3 { margin-top: 0; }
32
+ .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 0.8rem; }
33
+ code { background: var(--surface2); padding: 0.15rem 0.4rem; border-radius: 4px; font-family: 'JetBrains Mono', monospace; font-size: 0.85em; color: var(--orange); }
34
+ pre { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 1rem; overflow-x: auto; margin: 1rem 0; font-size: 0.85rem; }
35
+ pre code { background: none; padding: 0; color: var(--text); }
36
+ table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.9rem; }
37
+ th { background: var(--surface2); color: var(--accent); text-align: left; padding: 0.6rem 0.8rem; border: 1px solid var(--border); }
38
+ td { padding: 0.5rem 0.8rem; border: 1px solid var(--border); }
39
+ .highlight { border-left: 4px solid var(--accent); background: rgba(88,166,255,0.08); padding: 1rem; margin: 1rem 0; border-radius: 0 8px 8px 0; }
40
+ .footer { text-align: center; padding: 2rem 0; color: var(--text-muted); font-size: 0.85rem; border-top: 1px solid var(--border); margin-top: 3rem; }
41
+ .comparison td:first-child { font-weight: 600; color: var(--accent); }
42
+ .check { color: var(--green); }
43
+ .cross { color: var(--red); }
44
+ </style>
45
+ </head>
46
+ <body>
47
+ <div class="container">
48
+
49
+ <div class="hero">
50
+ <h1>HFL</h1>
51
+ <p class="subtitle">Run any HuggingFace model locally. 500K+ models at your fingertips.</p>
52
+ <div class="badges">
53
+ <span>v0.1.0</span>
54
+ <span>Python &ge;3.10</span>
55
+ <span>1900 tests</span>
56
+ <span>90%+ coverage</span>
57
+ <span>OpenAI &amp; Ollama compatible</span>
58
+ </div>
59
+ <div class="cta">
60
+ <a href="https://github.com/ggalancs/hfl" class="cta-primary">GitHub Repository</a>
61
+ <a href="https://ggalancs.github.io/hfl/" class="cta-secondary">Full Architecture Docs</a>
62
+ </div>
63
+ </div>
64
+
65
+ <section>
66
+ <h2>What is HFL?</h2>
67
+ <p><strong>HFL (HuggingFace Local)</strong> is a CLI + API server that lets you run HuggingFace models locally. While Ollama offers ~500 curated models, HFL gives you access to the <strong>500,000+ models</strong> on the HuggingFace Hub.</p>
68
+
69
+ <div class="highlight">
70
+ <strong>Key insight:</strong> HFL is to HuggingFace Hub what Ollama is to its own model library &mdash; but with 1000x more models available.
71
+ </div>
72
+ </section>
73
+
74
+ <section>
75
+ <h2>Quick Start</h2>
76
+ <pre><code># Install
77
+ pip install hfl
78
+
79
+ # Pull a model
80
+ hfl pull microsoft/Phi-3-mini-4k-instruct-gguf
81
+
82
+ # Chat interactively
83
+ hfl run microsoft/Phi-3-mini-4k-instruct-gguf
84
+
85
+ # Start API server (OpenAI + Ollama compatible)
86
+ hfl serve --model microsoft/Phi-3-mini-4k-instruct-gguf</code></pre>
87
+ </section>
88
+
89
+ <section>
90
+ <h2>HFL vs Ollama</h2>
91
+ <table class="comparison">
92
+ <tr><th>Feature</th><th>HFL</th><th>Ollama</th></tr>
93
+ <tr><td>Available models</td><td><span class="check">500,000+</span></td><td>~500</td></tr>
94
+ <tr><td>Source</td><td><span class="check">HuggingFace Hub</span></td><td>Ollama Library</td></tr>
95
+ <tr><td>OpenAI API compatible</td><td><span class="check">&#10003;</span></td><td><span class="check">&#10003;</span></td></tr>
96
+ <tr><td>Ollama API compatible</td><td><span class="check">&#10003;</span></td><td><span class="check">&#10003;</span></td></tr>
97
+ <tr><td>TTS support</td><td><span class="check">&#10003;</span></td><td><span class="cross">&#10007;</span></td></tr>
98
+ <tr><td>Multiple backends</td><td><span class="check">llama.cpp, transformers, vLLM</span></td><td>llama.cpp only</td></tr>
99
+ <tr><td>License verification</td><td><span class="check">Automatic (5 levels)</span></td><td><span class="cross">&#10007;</span></td></tr>
100
+ <tr><td>EU AI Act compliance</td><td><span class="check">Built-in</span></td><td><span class="cross">&#10007;</span></td></tr>
101
+ <tr><td>GGUF auto-conversion</td><td><span class="check">&#10003;</span></td><td><span class="cross">&#10007;</span></td></tr>
102
+ <tr><td>i18n (EN/ES)</td><td><span class="check">&#10003;</span></td><td><span class="cross">&#10007;</span></td></tr>
103
+ </table>
104
+ </section>
105
+
106
+ <section>
107
+ <h2>API Compatibility</h2>
108
+ <p>HFL exposes both <strong>OpenAI</strong> and <strong>Ollama</strong> compatible APIs, so it works as a drop-in replacement with existing tools:</p>
109
+ <div class="grid">
110
+ <div class="card">
111
+ <h3>OpenAI Endpoints</h3>
112
+ <p><code>POST /v1/chat/completions</code></p>
113
+ <p><code>POST /v1/completions</code></p>
114
+ <p><code>GET /v1/models</code></p>
115
+ <p><code>POST /v1/audio/speech</code></p>
116
+ </div>
117
+ <div class="card">
118
+ <h3>Ollama Endpoints</h3>
119
+ <p><code>POST /api/generate</code></p>
120
+ <p><code>POST /api/chat</code></p>
121
+ <p><code>GET /api/tags</code></p>
122
+ <p><code>POST /api/tts</code></p>
123
+ </div>
124
+ </div>
125
+ <p>Works with: <strong>Open WebUI</strong>, <strong>Chatbox</strong>, <strong>Continue.dev</strong>, and any OpenAI/Ollama-compatible client.</p>
126
+ </section>
127
+
128
+ <section>
129
+ <h2>12 CLI Commands</h2>
130
+ <table>
131
+ <tr><th>Command</th><th>Description</th></tr>
132
+ <tr><td><code>hfl pull</code></td><td>Download model from HuggingFace Hub</td></tr>
133
+ <tr><td><code>hfl run</code></td><td>Interactive chat with a model</td></tr>
134
+ <tr><td><code>hfl serve</code></td><td>Start API server</td></tr>
135
+ <tr><td><code>hfl list</code></td><td>List local models</td></tr>
136
+ <tr><td><code>hfl search</code></td><td>Search HuggingFace Hub</td></tr>
137
+ <tr><td><code>hfl inspect</code></td><td>Show model details</td></tr>
138
+ <tr><td><code>hfl rm</code></td><td>Remove a model</td></tr>
139
+ <tr><td><code>hfl alias</code></td><td>Create model aliases</td></tr>
140
+ <tr><td><code>hfl login / logout</code></td><td>Manage HF authentication</td></tr>
141
+ <tr><td><code>hfl version</code></td><td>Show version info</td></tr>
142
+ <tr><td><code>hfl compliance-report</code></td><td>Legal compliance report</td></tr>
143
+ </table>
144
+ </section>
145
+
146
+ <section>
147
+ <h2>Architecture Highlights</h2>
148
+ <div class="grid">
149
+ <div class="card">
150
+ <h3>3 Inference Backends</h3>
151
+ <p><strong>llama.cpp</strong> for GGUF (CPU/GPU), <strong>transformers</strong> for safetensors, <strong>vLLM</strong> for production GPU with real async streaming.</p>
152
+ </div>
153
+ <div class="card">
154
+ <h3>FailoverEngine</h3>
155
+ <p>Multi-backend with sticky routing. Automatically retries with the next engine if one fails.</p>
156
+ </div>
157
+ <div class="card">
158
+ <h3>Model Pool</h3>
159
+ <p>LRU eviction with real-time RAM/GPU memory tracking. Non-recursive concurrent loading.</p>
160
+ </div>
161
+ <div class="card">
162
+ <h3>Legal Compliance</h3>
163
+ <p>5-level license classification, EU AI Act notices, provenance logging, AI disclaimers.</p>
164
+ </div>
165
+ <div class="card">
166
+ <h3>Production Ready</h3>
167
+ <p>Rate limiting, API key auth, health probes, Prometheus metrics, SLO monitoring, structured logging.</p>
168
+ </div>
169
+ <div class="card">
170
+ <h3>TTS Support</h3>
171
+ <p>Text-to-speech via Bark and Coqui XTTS-v2 engines with OpenAI-compatible endpoints.</p>
172
+ </div>
173
+ </div>
174
+ </section>
175
+
176
+ <section>
177
+ <h2>Tech Stack</h2>
178
+ <div class="grid">
179
+ <div class="card">
180
+ <h3>Core</h3>
181
+ <p>Python 3.10+ &bull; FastAPI &bull; Typer &bull; Rich &bull; Pydantic</p>
182
+ </div>
183
+ <div class="card">
184
+ <h3>ML</h3>
185
+ <p>llama-cpp-python &bull; transformers &bull; vLLM &bull; Bark &bull; Coqui TTS</p>
186
+ </div>
187
+ <div class="card">
188
+ <h3>Quality</h3>
189
+ <p>1900 tests &bull; 90%+ coverage &bull; mypy &bull; ruff &bull; CI/CD</p>
190
+ </div>
191
+ </div>
192
+ </section>
193
+
194
+ <div class="footer">
195
+ <p>Created by <a href="https://github.com/ggalancs" style="color: var(--accent)">Gabriel Galan Pelayo</a> &bull; License: HRUL v1.0 &bull; March 2026</p>
196
+ <p style="margin-top: 0.5rem;"><a href="https://github.com/ggalancs/hfl" style="color: var(--accent)">GitHub</a> &bull; <a href="https://ggalancs.github.io/hfl/" style="color: var(--accent)">Full Docs</a> &bull; <a href="https://github.com/sponsors/ggalancs" style="color: var(--accent)">Sponsor</a></p>
197
+ </div>
198
+
199
+ </div>
200
+ </body>
201
  </html>