Manish Kumar commited on
Commit ·
d51f47c
1
Parent(s): de22824
Add README.md with HF Spaces config
Browse files
README.md
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: Levi AI Coder
|
| 3 |
+
emoji: ⚡
|
| 4 |
+
colorFrom: purple
|
| 5 |
+
colorTo: indigo
|
| 6 |
+
sdk: docker
|
| 7 |
+
app_port: 7860
|
| 8 |
+
pinned: false
|
| 9 |
+
license: apache-2.0
|
| 10 |
+
short_description: AI coding assistant powered by Qwen2.5-Coder
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
# Levi AI Coder
|
| 14 |
+
|
| 15 |
+
A production-ready AI coding assistant running **Qwen2.5-Coder-0.5B** locally via llama.cpp with a React + FastAPI stack.
|
| 16 |
+
|
| 17 |
+
## Features
|
| 18 |
+
|
| 19 |
+
- **AI Chat** – Chat with a local LLM for code help, debugging, and explanations
|
| 20 |
+
- **Code Playground** – Monaco Editor with code completion (FIM) support
|
| 21 |
+
- **Dashboard** – Quick actions, recent conversations, example prompts
|
| 22 |
+
- **Streaming** – Real-time token streaming via SSE
|
| 23 |
+
|
| 24 |
+
## Tech Stack
|
| 25 |
+
|
| 26 |
+
| Layer | Technology |
|
| 27 |
+
|-------|-----------|
|
| 28 |
+
| Frontend | React 19, TypeScript, Vite 8, Tailwind CSS v4, Framer Motion |
|
| 29 |
+
| Backend | Python 3.11, FastAPI, Uvicorn |
|
| 30 |
+
| LLM Engine | llama-cpp-python (CPU inference) |
|
| 31 |
+
| Model | Qwen2.5-Coder-0.5B-Instruct (Q4_K_M, ~500MB) |
|
| 32 |
+
|
| 33 |
+
## Deploy on Hugging Face Spaces
|
| 34 |
+
|
| 35 |
+
This repo is configured for **Docker-based** Spaces deployment.
|
| 36 |
+
|
| 37 |
+
### One-click Deploy
|
| 38 |
+
|
| 39 |
+
[](https://huggingface.co/new-space?template=Jinxcoder09/Levi)
|
| 40 |
+
|
| 41 |
+
### Manual Steps
|
| 42 |
+
|
| 43 |
+
1. Go to [huggingface.co/spaces](https://huggingface.co/spaces) → **Create new Space**
|
| 44 |
+
2. Set **Space name** (e.g. `levi-ai-coder`)
|
| 45 |
+
3. Set **License** to `apache-2.0`
|
| 46 |
+
4. **Space SDK**: select **Docker**
|
| 47 |
+
5. Choose **Docker template** (or leave default)
|
| 48 |
+
6. Set **Space hardware** – CPU basic is fine (2 vCPU, 16GB RAM)
|
| 49 |
+
7. Connect your GitHub repo or upload files directly
|
| 50 |
+
8. Click **Create Space**
|
| 51 |
+
|
| 52 |
+
The Dockerfile will build automatically. First deploy takes ~5-10 minutes (model download). Subsequent deploys use the cached Docker layers.
|
| 53 |
+
|
| 54 |
+
### Environment Variables (optional)
|
| 55 |
+
|
| 56 |
+
| Variable | Default | Description |
|
| 57 |
+
|----------|---------|-------------|
|
| 58 |
+
| `DEFAULT_TEMPERATURE` | `0.7` | LLM temperature |
|
| 59 |
+
| `DEFAULT_MAX_TOKENS` | `1024` | Max generated tokens |
|
| 60 |
+
| `DEFAULT_CONTEXT_LENGTH` | `2048` | Context window |
|
| 61 |
+
|
| 62 |
+
---
|
| 63 |
+
|
| 64 |
+
Built with [llama-cpp-python](https://github.com/abetlen/llama-cpp-python) and [FastAPI](https://fastapi.tiangolo.com/).
|