Spaces:
Running
Running
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>LFM2.5 Embedding API</title> | |
| <style> | |
| * { margin: 0; padding: 0; box-sizing: border-box; } | |
| body { | |
| font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; | |
| background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%); | |
| color: #e5e7eb; | |
| min-height: 100vh; | |
| padding: 40px 20px; | |
| line-height: 1.6; | |
| } | |
| .container { max-width: 900px; margin: 0 auto; } | |
| .hero { text-align: center; padding: 40px 0; } | |
| .hero h1 { | |
| font-size: 2.8em; | |
| background: linear-gradient(90deg, #a78bfa, #f472b6); | |
| -webkit-background-clip: text; | |
| -webkit-text-fill-color: transparent; | |
| background-clip: text; | |
| margin-bottom: 10px; | |
| } | |
| .hero .subtitle { font-size: 1.2em; color: #c7d2fe; margin-bottom: 20px; } | |
| .status-badge { | |
| display: inline-flex; | |
| align-items: center; | |
| gap: 8px; | |
| background: rgba(16, 185, 129, 0.15); | |
| border: 1px solid rgba(16, 185, 129, 0.4); | |
| padding: 8px 16px; | |
| border-radius: 50px; | |
| font-size: 0.9em; | |
| color: #6ee7b7; | |
| } | |
| .status-dot { | |
| width: 8px; | |
| height: 8px; | |
| background: #10b981; | |
| border-radius: 50%; | |
| animation: pulse 2s infinite; | |
| } | |
| @keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } } | |
| .card { | |
| background: rgba(255, 255, 255, 0.05); | |
| backdrop-filter: blur(10px); | |
| border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 16px; | |
| padding: 30px; | |
| margin-bottom: 20px; | |
| } | |
| .card h2 { | |
| color: #a78bfa; | |
| margin-bottom: 20px; | |
| font-size: 1.5em; | |
| } | |
| .grid { | |
| display: grid; | |
| grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); | |
| gap: 15px; | |
| margin-top: 15px; | |
| } | |
| .info-item { | |
| background: rgba(0, 0, 0, 0.2); | |
| padding: 15px; | |
| border-radius: 10px; | |
| border-left: 3px solid #a78bfa; | |
| } | |
| .info-item .label { | |
| font-size: 0.85em; | |
| color: #9ca3af; | |
| text-transform: uppercase; | |
| letter-spacing: 0.5px; | |
| } | |
| .info-item .value { | |
| font-size: 1.1em; | |
| color: #f3f4f6; | |
| margin-top: 4px; | |
| font-weight: 500; | |
| } | |
| pre { | |
| background: rgba(0, 0, 0, 0.4); | |
| border: 1px solid rgba(255, 255, 255, 0.1); | |
| border-radius: 10px; | |
| padding: 20px; | |
| overflow-x: auto; | |
| font-family: 'Courier New', monospace; | |
| font-size: 0.9em; | |
| color: #d1d5db; | |
| margin-top: 15px; | |
| } | |
| code { color: #fbbf24; } | |
| a { | |
| color: #a78bfa; | |
| text-decoration: none; | |
| border-bottom: 1px dashed #a78bfa; | |
| } a:hover { color: #f472b6; border-bottom-color: #f472b6; } | |
| .endpoint { | |
| display: inline-block; | |
| background: #10b981; | |
| color: white; | |
| padding: 4px 10px; | |
| border-radius: 6px; | |
| font-size: 0.8em; | |
| font-weight: bold; | |
| margin-right: 8px; | |
| } | |
| .footer { | |
| text-align: center; | |
| padding: 30px 0; | |
| color: #9ca3af; | |
| font-size: 0.9em; | |
| } | |
| .btn { | |
| display: inline-block; | |
| background: linear-gradient(90deg, #a78bfa, #f472b6); | |
| color: white; | |
| padding: 12px 24px; | |
| border-radius: 8px; | |
| font-weight: 500; | |
| margin-top: 15px; | |
| border: none; | |
| } | |
| .btn:hover { opacity: 0.9; } | |
| </style> | |
| </head> | |
| <body> | |
| <div class="container"> | |
| <div class="hero"> | |
| <h1>π§ LFM2.5 Embedding API</h1> | |
| <p class="subtitle">OpenAI-compatible embeddings running on pure CPU</p> | |
| <div class="status-badge"> | |
| <span class="status-dot"></span> | |
| <span>Operational</span> | |
| </div> | |
| </div> | |
| <div class="card"> | |
| <h2>π Model Information</h2> | |
| <div class="grid"> | |
| <div class="info-item"> | |
| <div class="label">Model</div> | |
| <div class="value">LFM2.5-Embedding-350M</div> | |
| </div> | |
| <div class="info-item"> | |
| <div class="label">Provider</div> <div class="value">Liquid AI</div> | |
| </div> | |
| <div class="info-item"> | |
| <div class="label">Dimensions</div> | |
| <div class="value">1024 floats</div> | |
| </div> | |
| <div class="info-item"> | |
| <div class="label">Context</div> | |
| <div class="value">512 tokens</div> | |
| </div> | |
| <div class="info-item"> | |
| <div class="label">Quantization</div> | |
| <div class="value">Q8_0 (GGUF)</div> | |
| </div> | |
| <div class="info-item"> | |
| <div class="label">Engine</div> | |
| <div class="value">llama.cpp (CPU)</div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="card"> | |
| <h2>π Endpoint</h2> | |
| <p><span class="endpoint">POST</span><code>/v1/embeddings</code></p> | |
| <p style="margin-top: 15px;">Compatible with OpenAI SDK, LangChain, LlamaIndex, Open WebUI, Cursor, OpenClaw, and more.</p> | |
| </div> | |
| <div class="card"> | |
| <h2>π Quick Start (cURL)</h2> | |
| <pre><code>curl -X POST "https://YOUR-SPACE.hf.space/v1/embeddings" \ | |
| -H "Authorization: Bearer YOUR_API_KEY" \ | |
| -H "Content-Type: application/json" \ | |
| -d '{ | |
| "input": "Your text here", | |
| "model": "LiquidAI/LFM2.5-Embedding-350M", | |
| "input_type": "document" | |
| }'</code></pre> | |
| </div> | |
| <div class="card"> | |
| <h2>π Python Example</h2> | |
| <pre><code>from openai import OpenAI | |
| client = OpenAI( | |
| api_key="YOUR_API_KEY", | |
| base_url="https://YOUR-SPACE.hf.space/v1/" | |
| ) | |
| response = client.embeddings.create( | |
| model="LiquidAI/LFM2.5-Embedding-350M", input="Your text here", | |
| extra_body={"input_type": "document"} | |
| ) | |
| print(response.data[0].embedding[:5])</code></pre> | |
| </div> | |
| <div class="card"> | |
| <h2>π Authentication</h2> | |
| <p>All requests require a Bearer token:</p> | |
| <pre><code>Authorization: Bearer YOUR_API_KEY</code></pre> | |
| </div> | |
| <div class="card" style="text-align: center;"> | |
| <h2>π Documentation</h2> | |
| <p>For complete setup instructions and licensing:</p> | |
| <a href="https://huggingface.co/spaces/Edu014/LFM2.5-Embedding/blob/main/README.md" target="_blank" rel="noopener">View README β</a> | |
| <div class="footer"> | |
| <p>Built with β€οΈ for the RAG community</p> | |
| <p style="margin-top: 8px; font-size: 0.85em;"> | |
| Powered by <a href="https://www.liquid.ai" target="_blank" rel="noopener">Liquid AI</a> β’ | |
| <a href="https://github.com/ggerganov/llama.cpp" target="_blank" rel="noopener">llama.cpp</a> β’ | |
| <a href="https://fastapi.tiangolo.com" target="_blank" rel="noopener">FastAPI</a> | |
| </p> | |
| </div> | |
| </div> | |
| </body> | |
| </html> |