File size: 2,740 Bytes
f8b4220
 
 
 
 
 
 
 
 
 
4023304
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
---
title: Krish Mind Chat
emoji: 🧠
colorFrom: blue
colorTo: blue
sdk: docker
app_file: app.py
pinned: false
---

# Deployment Instructions (Hugging Face Spaces)

Your deployment package is ready! Follow these steps to put Krish Mind online for free.

## 1. No Manual Model Upload Needed!
Great news! Since your model is already on Hugging Face (`Krishkanth/krish-mind-gguf-Q4`), the app will download it automatically when it starts.

You **DO NOT** need to copy the 5GB model file into this folder.

## 2. Create Hugging Face Space
1. Login to [Hugging Face](https://huggingface.co).
2. Click **New Space**.
3. Name: `krish-mind-chat` (or similar).
4. SDK: **Docker** (Select "Blank" template).
5. Hardware: **CPU Basic (Free)** (2 vCPU, 16GB RAM).
6. Create Space.

## 3. Upload Files
You have two options:

### Option A: Web Upload (Easiest)
1. Go to the **Files** tab of your new Space.
2. Click **Add file > Upload files**.
3. Drag and drop these files/folders from `d:\Krish Mind\deployment`:
   - `Dockerfile`
   - `requirements.txt`
   - `app.py`
   - `static/` folder
   - `data/` folder
4. Commit changes.

### Option B: Git (Recommended for Code)
If you prefer the command line:

1.  **Clone your empty Space:**
    ```bash
    git clone https://huggingface.co/spaces/YOUR_USERNAME/krish-mind-chat
    cd krish-mind-chat
    ```
2.  **Copy files:**
    - Copy all files from `d:\Krish Mind\deployment` (except the `model` folder!) into this new `krish-mind-chat` folder.
3.  **Push:**
    ```bash
    git add .
    git commit -m "Deploy Krish Mind"
    git push
    ```

> **🔑 Authentication Required:** 
> When asked for credentials:
> - **Username**: Your Hugging Face username (e.g., `Krishkanth`)
> - **Password**: Your **Hugging Face Access Token** (Not your password!)
>   - Go to [Settings > Access Tokens](https://huggingface.co/settings/tokens)
>   - Create a new token with **Write** permissions.
>   - Copy and paste it as the password.

## FAQ: Why GGUF? Why not Safetensors (HF Fixed)?
You asked about using your `hf_fixed` model. Here is why we **MUST use GGUF** for the Free Tier:
- **RAM Limit:** Hugging Face Free Tier gives you **16GB RAM**.
    - **Safetensors (HF Fixed)**: A 7B model takes **~15GB+ RAM**. It will likely **crash** (Out of Memory) or be extremely slow.
    - **GGUF (Q4)**: Takes only **~5-6GB RAM**. It runs fast and stable on the Free Tier.
- **Speed:** GGUF is optimized for CPU. Safetensors is built for GPU. On a free CPU Space, Safetensors would be unusably slow (like 1 word per 5 seconds).

**Deploy with confidence!** The current setup downloads the GGUF model directly from your repo `Krishkanth/krish-mind` on startup. purely cloud-to-cloud. negligible upload time for you!