File size: 3,173 Bytes
b830719
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# Deployment Guide for Hugging Face Spaces

## Quick Deployment Steps

### Option 1: Using Hugging Face Web Interface (Recommended)

1. **Create a new Space**:
   - Go to https://huggingface.co/new-space
   - Name: `parakeet-progressive-streaming` (or your preferred name)
   - License: `mit`
   - SDK: `static`
   - Click "Create Space"

2. **Upload files**:
   - Upload the entire `dist/` folder contents to your Space
   - Upload `README.md` to the root (this will be displayed on the Space page)

   The file structure should look like:
   ```
   your-space/
   β”œβ”€β”€ README.md
   β”œβ”€β”€ index.html
   └── assets/
       β”œβ”€β”€ *.js
       β”œβ”€β”€ *.css
       └── *.wasm
   ```

3. **Done!** Your Space will be live at `https://huggingface.co/spaces/YOUR_USERNAME/SPACE_NAME`

### Option 2: Using Git (Advanced)

1. **Initialize git repository** (if not already done):
   ```bash
   cd parakeet-web-demo
   git init
   git add dist/ README.md
   git commit -m "Initial commit: Parakeet progressive streaming demo"
   ```

2. **Add Hugging Face remote**:
   ```bash
   git remote add hf https://huggingface.co/spaces/YOUR_USERNAME/SPACE_NAME
   ```

3. **Push to Hugging Face**:
   ```bash
   git push hf main
   ```

## What Gets Deployed

The `dist/` folder contains:
- `index.html` - Main HTML entry point
- `assets/*.js` - JavaScript bundles (React app, worker, libraries)
- `assets/*.css` - Stylesheets
- `assets/*.wasm` - ONNX Runtime WebAssembly files

Total size: ~47MB (mostly WASM files for ONNX Runtime)

## Post-Deployment

After deployment, your Space will:
1. Load immediately (static site)
2. Download the Parakeet model (~2.5GB) on first use
3. Cache the model in the browser's IndexedDB for subsequent visits

## Updating the Space

To update after making changes:

1. **Rebuild**:
   ```bash
   npm run build
   ```

2. **Upload new dist/ contents** via the web interface, or:
   ```bash
   git add dist/
   git commit -m "Update: description of changes"
   git push hf main
   ```

## Testing Locally Before Deployment

```bash
npm run preview
```

This will serve the production build locally at http://localhost:4173

## Troubleshooting

### Space shows blank page
- Check browser console for errors
- Verify all files in `dist/` were uploaded
- Ensure `index.html` is in the root directory

### Model fails to load
- Check that the Space has WebGPU enabled (Chrome 113+, Edge 113+)
- Verify CORS headers are set correctly (Hugging Face handles this automatically)
- Check browser console for specific error messages

### Performance is slow
- This is expected - see README.md for performance notes
- Ensure WebGPU is available (check console logs)
- Try on a different browser (Chrome/Edge recommended)

## Browser Requirements

Recommend users use:
- **Chrome 113+** or **Edge 113+** for full WebGPU support
- Modern desktop/laptop (mobile may be very slow)
- Good internet connection for initial model download

## Privacy & Security

The demo:
- βœ… Runs entirely client-side (no server processing)
- βœ… No data sent to any server
- βœ… Model cached locally in browser
- βœ… Microphone access required (browser prompt)