Spaces:
Running
Running
milwright
commited on
Commit
Β·
75a69fd
1
Parent(s):
4734506
merge: update support_docs with formatting improvements and file order fix
Browse files- support_docs.py +40 -38
support_docs.py
CHANGED
|
@@ -13,7 +13,7 @@ def create_support_docs():
|
|
| 13 |
gr.Markdown("# ChatUI Helper Documentation")
|
| 14 |
gr.Markdown("Welcome to ChatUI Helper! This tool helps you create customizable AI chat interfaces for deployment on HuggingFace Spaces.")
|
| 15 |
|
| 16 |
-
with gr.Accordion("
|
| 17 |
gr.Markdown("""
|
| 18 |
## Quick Start Guide
|
| 19 |
|
|
@@ -149,7 +149,7 @@ def create_support_docs():
|
|
| 149 |
**2.1 Upload Project Files**
|
| 150 |
- Navigate to Files tab
|
| 151 |
- Click "Upload files" or drag and drop
|
| 152 |
-
- Upload: `app.py`, `config.json`, `requirements.txt`
|
| 153 |
- Commit directly to main branch
|
| 154 |
""")
|
| 155 |
|
|
@@ -176,50 +176,20 @@ def create_support_docs():
|
|
| 176 |
with gr.Accordion("Step 3: Configure API Secrets", open=False):
|
| 177 |
gr.Markdown("""
|
| 178 |
**3.1 Configure HuggingFace Spaces Secrets**
|
|
|
|
|
|
|
| 179 |
|
| 180 |
-
**Step 1: Go to Settings**
|
| 181 |
-
- Navigate to your Space's Settings tab
|
| 182 |
-
""")
|
| 183 |
-
|
| 184 |
-
# Image for Settings navigation
|
| 185 |
-
gr.Image(
|
| 186 |
-
value="img/img4.png",
|
| 187 |
-
label="Go to Settings",
|
| 188 |
-
show_label=True,
|
| 189 |
-
interactive=False,
|
| 190 |
-
width=600,
|
| 191 |
-
container=True
|
| 192 |
-
)
|
| 193 |
-
|
| 194 |
-
gr.Markdown("""
|
| 195 |
-
**Step 2: Click "New secret"**
|
| 196 |
-
- In the Variables and secrets section
|
| 197 |
-
- Click the "New secret" button
|
| 198 |
-
""")
|
| 199 |
-
|
| 200 |
-
# Image for New secret button
|
| 201 |
-
gr.Image(
|
| 202 |
-
value="img/img3.png",
|
| 203 |
-
label="Click New Secret",
|
| 204 |
-
show_label=True,
|
| 205 |
-
interactive=False,
|
| 206 |
-
width=600,
|
| 207 |
-
container=True
|
| 208 |
-
)
|
| 209 |
-
|
| 210 |
-
gr.Markdown("""
|
| 211 |
**Required Secret:**
|
| 212 |
-
-
|
| 213 |
-
- Get from: https://openrouter.ai/keys
|
| 214 |
- Must start with: `sk-or-`
|
| 215 |
- Add in: Settings β Variables and secrets
|
| 216 |
|
| 217 |
**Optional Secrets:**
|
| 218 |
-
-
|
| 219 |
- Get from: https://huggingface.co/settings/tokens
|
| 220 |
- Needs write permissions
|
| 221 |
-
|
| 222 |
-
-
|
| 223 |
- Set any password value
|
| 224 |
- Share with authorized users only
|
| 225 |
|
|
@@ -229,6 +199,38 @@ def create_support_docs():
|
|
| 229 |
- To disable access control, delete the `SPACE_ACCESS_CODE` secret entirely
|
| 230 |
- Do NOT set an empty value - either set a code or don't create the secret at all
|
| 231 |
""")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 232 |
|
| 233 |
with gr.Accordion("Step 4: Monitor Build & Verify Configuration", open=False):
|
| 234 |
gr.Markdown("""
|
|
|
|
| 13 |
gr.Markdown("# ChatUI Helper Documentation")
|
| 14 |
gr.Markdown("Welcome to ChatUI Helper! This tool helps you create customizable AI chat interfaces for deployment on HuggingFace Spaces.")
|
| 15 |
|
| 16 |
+
with gr.Accordion("π Quick Start Guide", open=True):
|
| 17 |
gr.Markdown("""
|
| 18 |
## Quick Start Guide
|
| 19 |
|
|
|
|
| 149 |
**2.1 Upload Project Files**
|
| 150 |
- Navigate to Files tab
|
| 151 |
- Click "Upload files" or drag and drop
|
| 152 |
+
- Upload: `README.md`, `app.py`, `config.json`, `requirements.txt`
|
| 153 |
- Commit directly to main branch
|
| 154 |
""")
|
| 155 |
|
|
|
|
| 176 |
with gr.Accordion("Step 3: Configure API Secrets", open=False):
|
| 177 |
gr.Markdown("""
|
| 178 |
**3.1 Configure HuggingFace Spaces Secrets**
|
| 179 |
+
- Go to Settings β Variables and secrets
|
| 180 |
+
- Click "New secret"
|
| 181 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 182 |
**Required Secret:**
|
| 183 |
+
- `API_KEY` (or your configured variable name)
|
|
|
|
| 184 |
- Must start with: `sk-or-`
|
| 185 |
- Add in: Settings β Variables and secrets
|
| 186 |
|
| 187 |
**Optional Secrets:**
|
| 188 |
+
- `HF_TOKEN`: Enables automatic configuration updates
|
| 189 |
- Get from: https://huggingface.co/settings/tokens
|
| 190 |
- Needs write permissions
|
| 191 |
+
|
| 192 |
+
- `ACCESS_CODE`: Password protects your Space
|
| 193 |
- Set any password value
|
| 194 |
- Share with authorized users only
|
| 195 |
|
|
|
|
| 199 |
- To disable access control, delete the `SPACE_ACCESS_CODE` secret entirely
|
| 200 |
- Do NOT set an empty value - either set a code or don't create the secret at all
|
| 201 |
""")
|
| 202 |
+
|
| 203 |
+
with gr.Row():
|
| 204 |
+
|
| 205 |
+
with gr.Column(scale=1):
|
| 206 |
+
gr.Image(
|
| 207 |
+
value="img/img4.png",
|
| 208 |
+
label="Navigating to Settings",
|
| 209 |
+
show_label=True,
|
| 210 |
+
interactive=False,
|
| 211 |
+
width=400,
|
| 212 |
+
container=False
|
| 213 |
+
)
|
| 214 |
+
|
| 215 |
+
with gr.Column(scale=1):
|
| 216 |
+
gr.Image(
|
| 217 |
+
value="img/img4.png",
|
| 218 |
+
label="Settings Variables and Secrets",
|
| 219 |
+
show_label=True,
|
| 220 |
+
interactive=False,
|
| 221 |
+
width=400,
|
| 222 |
+
container=False
|
| 223 |
+
)
|
| 224 |
+
|
| 225 |
+
with gr.Column(scale=1):
|
| 226 |
+
gr.Image(
|
| 227 |
+
value="img/img3.png",
|
| 228 |
+
label="API Key Secret Configuration",
|
| 229 |
+
show_label=True,
|
| 230 |
+
interactive=False,
|
| 231 |
+
width=400,
|
| 232 |
+
container=False
|
| 233 |
+
)
|
| 234 |
|
| 235 |
with gr.Accordion("Step 4: Monitor Build & Verify Configuration", open=False):
|
| 236 |
gr.Markdown("""
|