Spaces:
Running
Running
Update docs.md
Browse files
docs.md
CHANGED
|
@@ -17,6 +17,12 @@ Welcome to ChatUI Helper! This tool helps you create customizable AI chat interf
|
|
| 17 |
- OpenRouter API key
|
| 18 |
- Basic understanding of AI assistants
|
| 19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
## π Step 1: Configure & Preview Your Space
|
| 21 |
|
| 22 |
### Configuration Tab Overview
|
|
@@ -95,7 +101,7 @@ Configure your assistant through various sections in the Configuration tab, then
|
|
| 95 |
- Assistant will cite specific URLs when using grounded information
|
| 96 |
- Use the β/β buttons to manage URLs
|
| 97 |
|
| 98 |
-
<img src="img/grounding.png" alt="URL Grounding Configuration" width="
|
| 99 |
|
| 100 |
</details>
|
| 101 |
|
|
@@ -118,7 +124,8 @@ Configure your assistant through various sections in the Configuration tab, then
|
|
| 118 |
- Users will need this code to access
|
| 119 |
- Leave unset for public access
|
| 120 |
|
| 121 |
-
<img src="img/
|
|
|
|
| 122 |
|
| 123 |
</details>
|
| 124 |
|
|
@@ -151,19 +158,18 @@ Configure your assistant through various sections in the Configuration tab, then
|
|
| 151 |
- Language-specific responses
|
| 152 |
- Conversation export
|
| 153 |
|
| 154 |
-
<img src="img/preview.png" alt="Preview
|
| 155 |
|
| 156 |
</details>
|
| 157 |
|
|
|
|
|
|
|
|
|
|
| 158 |
## π³οΈ Step 2: Generate & Deploy
|
| 159 |
|
| 160 |
### Deployment Package & HuggingFace Space Setup
|
| 161 |
|
| 162 |
-
**Package Contents:**
|
| 163 |
-
- `app.py`: Complete Gradio application
|
| 164 |
-
- `requirements.txt`: Python dependencies
|
| 165 |
-
- `config.json`: Configuration backup
|
| 166 |
-
- `README.md`: Deployment instructions
|
| 167 |
|
| 168 |
<details>
|
| 169 |
<summary><b>Generate & Create Space</b></summary>
|
|
@@ -180,14 +186,14 @@ Configure your assistant through various sections in the Configuration tab, then
|
|
| 180 |
|
| 181 |
1. Go to [huggingface.co/spaces](https://huggingface.co/spaces)
|
| 182 |
2. Click "Create new Space"
|
| 183 |
-
|
| 184 |
-
|
| 185 |
3. Name your Space
|
| 186 |
-
4.
|
| 187 |
-
5.
|
| 188 |
-
6.
|
| 189 |
-
7.
|
|
|
|
| 190 |
|
|
|
|
| 191 |
<img src="img/space.png" alt="Deployed Space" width="500">
|
| 192 |
|
| 193 |
</details>
|
|
@@ -206,9 +212,9 @@ Configure your assistant through various sections in the Configuration tab, then
|
|
| 206 |
- `requirements.txt`
|
| 207 |
5. Commit directly to main branch, and your Space will start building
|
| 208 |
|
| 209 |
-
<img src="img/drop-files.png" alt="Drag and drop files" width="
|
| 210 |
|
| 211 |
-
<img src="img/uploading.png" alt="Commit files to space" width="
|
| 212 |
|
| 213 |
</details>
|
| 214 |
|
|
@@ -217,18 +223,16 @@ Configure your assistant through various sections in the Configuration tab, then
|
|
| 217 |
|
| 218 |
**Navigate to Settings**
|
| 219 |
1. Click the **Settings** tab in your Space
|
| 220 |
-
|
|
|
|
| 221 |
3. Click **New secret**
|
| 222 |
-
|
| 223 |
-
<img src="img/settings.png" alt="Navigate to settings" width="400">
|
| 224 |
|
| 225 |
**Add Required Secret**
|
| 226 |
- **Name**: `API_KEY` (or your configured variable name)
|
| 227 |
- **Value**: Your OpenRouter API key
|
| 228 |
- Must start with `sk-or-`
|
| 229 |
|
| 230 |
-
<img src="img/add-secret-api.png" alt="Adding API Key Secret" width="400">
|
| 231 |
-
|
| 232 |
**Add Optional Secrets (if desired)**
|
| 233 |
- **HF_TOKEN**: Your HuggingFace token with write permissions
|
| 234 |
- Enables the configuration editor in your Space
|
|
@@ -267,6 +271,9 @@ Configure your assistant through various sections in the Configuration tab, then
|
|
| 267 |
|
| 268 |
</details>
|
| 269 |
|
|
|
|
|
|
|
|
|
|
| 270 |
## π§ Troubleshooting
|
| 271 |
|
| 272 |
### Common Issues and Solutions
|
|
@@ -323,14 +330,8 @@ Find solutions to common problems organized by category.
|
|
| 323 |
<details>
|
| 324 |
<summary><b>Preview Tab Not Working</b></summary>
|
| 325 |
|
| 326 |
-
**Local Testing**
|
| 327 |
-
- Set API_KEY in your local .env file
|
| 328 |
-
- Format: `API_KEY=sk-or-your-key-here`
|
| 329 |
-
- Restart the app after adding environment variable
|
| 330 |
-
|
| 331 |
**Preview Issues**
|
| 332 |
- Click "π¬ Preview Configuration" first
|
| 333 |
-
- Check browser console (F12) for JavaScript errors
|
| 334 |
- Ensure all required fields are filled
|
| 335 |
- Try refreshing the page
|
| 336 |
|
|
@@ -352,21 +353,8 @@ Find solutions to common problems organized by category.
|
|
| 352 |
|
| 353 |
</details>
|
| 354 |
|
| 355 |
-
|
| 356 |
-
|
| 357 |
-
|
| 358 |
-
**Infinite Loading**
|
| 359 |
-
- Check Space logs for error messages
|
| 360 |
-
- Common cause: Missing required secrets
|
| 361 |
-
- Verify all files uploaded correctly
|
| 362 |
-
|
| 363 |
-
**Gradio App Errors**
|
| 364 |
-
- Component version mismatches
|
| 365 |
-
- Update to latest Gradio version
|
| 366 |
-
- Check for deprecated components
|
| 367 |
-
- Review migration guides for Gradio 5.x
|
| 368 |
-
|
| 369 |
-
</details>
|
| 370 |
|
| 371 |
## π Additional Resources
|
| 372 |
|
|
|
|
| 17 |
- OpenRouter API key
|
| 18 |
- Basic understanding of AI assistants
|
| 19 |
|
| 20 |
+
<img src="img/march.png" alt="March of Intellect by Robert Seymour" width="500">
|
| 21 |
+
<i>"March of the Intellect" by Robert Seymour (c.1828)</i>
|
| 22 |
+
|
| 23 |
+
---
|
| 24 |
+
---
|
| 25 |
+
|
| 26 |
## π Step 1: Configure & Preview Your Space
|
| 27 |
|
| 28 |
### Configuration Tab Overview
|
|
|
|
| 101 |
- Assistant will cite specific URLs when using grounded information
|
| 102 |
- Use the β/β buttons to manage URLs
|
| 103 |
|
| 104 |
+
<img src="img/grounding.png" alt="URL Grounding Configuration" width="300">
|
| 105 |
|
| 106 |
</details>
|
| 107 |
|
|
|
|
| 124 |
- Users will need this code to access
|
| 125 |
- Leave unset for public access
|
| 126 |
|
| 127 |
+
<img src="img/settings.png" alt="Navigate to Settings" width="500">
|
| 128 |
+
<img src="img/add-secret-api.png" alt="Variables and Secrets" width="500">
|
| 129 |
|
| 130 |
</details>
|
| 131 |
|
|
|
|
| 158 |
- Language-specific responses
|
| 159 |
- Conversation export
|
| 160 |
|
| 161 |
+
<img src="img/preview-config.png" alt="Preview Configuration" width="500">
|
| 162 |
|
| 163 |
</details>
|
| 164 |
|
| 165 |
+
---
|
| 166 |
+
---
|
| 167 |
+
|
| 168 |
## π³οΈ Step 2: Generate & Deploy
|
| 169 |
|
| 170 |
### Deployment Package & HuggingFace Space Setup
|
| 171 |
|
| 172 |
+
**Package Contents:** `app.py` (application), `requirements.txt` (dependencies), `config.json` (configuration), `README.md` (overview)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 173 |
|
| 174 |
<details>
|
| 175 |
<summary><b>Generate & Create Space</b></summary>
|
|
|
|
| 186 |
|
| 187 |
1. Go to [huggingface.co/spaces](https://huggingface.co/spaces)
|
| 188 |
2. Click "Create new Space"
|
|
|
|
|
|
|
| 189 |
3. Name your Space
|
| 190 |
+
4. Add your preferred licensing (e.g. gpl-3, mit)
|
| 191 |
+
5. Select **Gradio** SDK
|
| 192 |
+
6. Choose **Blank** template
|
| 193 |
+
7. Select hardware (CPU Basic is free)
|
| 194 |
+
8. Click "Create Space"
|
| 195 |
|
| 196 |
+
<img src="img/create-space.png" alt="Click Create Space" width="500">
|
| 197 |
<img src="img/space.png" alt="Deployed Space" width="500">
|
| 198 |
|
| 199 |
</details>
|
|
|
|
| 212 |
- `requirements.txt`
|
| 213 |
5. Commit directly to main branch, and your Space will start building
|
| 214 |
|
| 215 |
+
<img src="img/drop-files.png" alt="Drag and drop files" width="500">
|
| 216 |
|
| 217 |
+
<img src="img/uploading.png" alt="Commit files to space" width="500">
|
| 218 |
|
| 219 |
</details>
|
| 220 |
|
|
|
|
| 223 |
|
| 224 |
**Navigate to Settings**
|
| 225 |
1. Click the **Settings** tab in your Space
|
| 226 |
+
<img src="img/settings.png" alt="Navigate to settings" width="500">
|
| 227 |
+
2. Scroll down to **Variables and secrets** section
|
| 228 |
3. Click **New secret**
|
| 229 |
+
<img src="img/add-secret-api.png" alt="Adding API Key Secret" width="500">
|
|
|
|
| 230 |
|
| 231 |
**Add Required Secret**
|
| 232 |
- **Name**: `API_KEY` (or your configured variable name)
|
| 233 |
- **Value**: Your OpenRouter API key
|
| 234 |
- Must start with `sk-or-`
|
| 235 |
|
|
|
|
|
|
|
| 236 |
**Add Optional Secrets (if desired)**
|
| 237 |
- **HF_TOKEN**: Your HuggingFace token with write permissions
|
| 238 |
- Enables the configuration editor in your Space
|
|
|
|
| 271 |
|
| 272 |
</details>
|
| 273 |
|
| 274 |
+
---
|
| 275 |
+
---
|
| 276 |
+
|
| 277 |
## π§ Troubleshooting
|
| 278 |
|
| 279 |
### Common Issues and Solutions
|
|
|
|
| 330 |
<details>
|
| 331 |
<summary><b>Preview Tab Not Working</b></summary>
|
| 332 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 333 |
**Preview Issues**
|
| 334 |
- Click "π¬ Preview Configuration" first
|
|
|
|
| 335 |
- Ensure all required fields are filled
|
| 336 |
- Try refreshing the page
|
| 337 |
|
|
|
|
| 353 |
|
| 354 |
</details>
|
| 355 |
|
| 356 |
+
---
|
| 357 |
+
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 358 |
|
| 359 |
## π Additional Resources
|
| 360 |
|