milwright commited on
Commit
5b97eba
·
verified ·
1 Parent(s): d1418bf

Update support_docs.py

Browse files
Files changed (1) hide show
  1. support_docs.py +27 -23
support_docs.py CHANGED
@@ -15,7 +15,7 @@ def create_support_docs():
15
 
16
  with gr.Accordion("📖 Quick Start Guide", open=True):
17
  gr.Markdown("""
18
- ## Quick Start Guide
19
 
20
  1. **Configure** your assistant using templates or custom settings
21
  2. **Preview** your configuration to test it works
@@ -26,29 +26,32 @@ def create_support_docs():
26
  - HuggingFace account (free)
27
  - OpenRouter API key
28
  - Basic understanding of AI assistants
 
 
 
29
  """)
30
 
31
  with gr.Accordion("📝 Step 1: Configure Your Space", open=False):
32
  gr.Markdown("""
33
  ### Configuration Tab Sections
34
 
35
- **1. Templates & Identity** Included are several pre-populated templates to get you started with playful (but applied) configurations. Or start with the "None (Custom)" option for a blank slate. Personalize the chat u/i and giving it a name, header (max 60 char) and a markdown description for the `README.md` file, then select from Gradio themes like Default, Soft, Glass, Monochrome, or Base.
36
 
37
- **3. Model Configuration**: Craft a system prompt that steers your model's behavior using a well-defined role, context and audience, code of conduct, and/or terms of engagement——think of guardrails as creative constraints. Afterward select a model ID from the menu of options, then experiment with sampling parameters, adjusting temperature (values from 0 to 2) to control response variability and/or setting a token response limit (between 50-4096) to cap output.
38
 
39
- **4. Example Prompts**: Add 3 to 5 starter prompts that showcase the purpose and design of your space. These examples appear as quick-start buttons for users to try and meant to help them get started.
40
 
41
- **5. URL Grounding**: Add up to 10 reference URLs that ground the model in the context of different webpages. The first 2 URLs function as primary sources that will always be loaded with each query, while other URLs serve as supplementary context. Note that only 4096 total characters from URLs are appended to the system prompt.
42
 
43
- **6. API Key and HuggingFace Token**
44
 
45
- - Required: Provide the required OpenAI-standard API key (`sk-`) and name for its variable (`API_KEY`) to call the model through a provider like OpenRouter
46
 
47
- - Recommended: Add a HuggingFace token (`HF_TOKEN`) to make your space customizable over time through a configuration editor
48
 
49
- - Optional: Set an optional password (`ACCESS_CODE`) to limit who can access your space. Any value goes.
50
 
51
- **7. Upload `config.json`**: Done this before? Upload an existing `config.json` files to redeploy your Space with new settings and recent versions.
52
  """)
53
 
54
  with gr.Accordion("💬 Step 2: Preview Your Assistant", open=False):
@@ -67,16 +70,19 @@ def create_support_docs():
67
  - `README.md`: Deployment instructions
68
 
69
  **Deployment Overview:** Generate Package → Create Space → Upload Files → Configure Secrets → Monitor Build → Verify
 
 
 
70
  """)
71
 
72
- with gr.Accordion("Step 1: Generate & Create Space", open=False):
73
  gr.Markdown("""
74
- **1.1 Generate Deployment Package**
75
  - Click "🗳️ Generate Deployment Package" in Configuration tab
76
  - Download the generated ZIP file
77
  - Extract files: `app.py`, `config.json`, `requirements.txt`, `README.md`
78
 
79
- **1.2 Create New Space**
80
  - Go to [huggingface.co/spaces](https://huggingface.co/spaces)
81
  - Click "New Space"
82
  - Choose Gradio SDK (Blank)
@@ -103,7 +109,7 @@ def create_support_docs():
103
  container=False
104
  )
105
 
106
- with gr.Accordion("Step 2: Upload Files", open=False):
107
  gr.Markdown("""
108
  **2.1 Upload Project Files**
109
  - Navigate to Files tab
@@ -132,30 +138,28 @@ def create_support_docs():
132
  container=False
133
  )
134
 
135
- with gr.Accordion("Step 3: Configure API Secrets", open=False):
136
  gr.Markdown("""
137
- **3.1 Configure HuggingFace Spaces Secrets**
138
  - Go to Settings → Variables and secrets
139
  - Click "New secret"
140
 
141
  **Required Secret:**
142
  - `API_KEY` (or your configured variable name)
143
  - Must start with: `sk-or-`
144
- - Add in: Settings → Variables and secrets
145
 
146
  **Optional Secrets:**
147
- - `HF_TOKEN`: Enables automatic configuration updates
148
  - Get from: https://huggingface.co/settings/tokens
149
- - Needs write permissions
150
 
151
  - `ACCESS_CODE`: Password protects your Space
152
- - Set any password value
 
153
  - Share with authorized users only
154
 
155
  **Access Control Notes:**
156
- - If you don't create the `SPACE_ACCESS_CODE` secret, your Space will be publicly accessible
157
- - To enable access control, create the `SPACE_ACCESS_CODE` secret with your chosen code value
158
- - To disable access control, delete the `SPACE_ACCESS_CODE` secret entirely
159
  - Do NOT set an empty value - either set a code or don't create the secret at all
160
  """)
161
 
 
15
 
16
  with gr.Accordion("📖 Quick Start Guide", open=True):
17
  gr.Markdown("""
18
+ ## Overview
19
 
20
  1. **Configure** your assistant using templates or custom settings
21
  2. **Preview** your configuration to test it works
 
26
  - HuggingFace account (free)
27
  - OpenRouter API key
28
  - Basic understanding of AI assistants
29
+
30
+ ---
31
+
32
  """)
33
 
34
  with gr.Accordion("📝 Step 1: Configure Your Space", open=False):
35
  gr.Markdown("""
36
  ### Configuration Tab Sections
37
 
38
+ **1a. Templates & Identity** Included are several pre-populated templates to get you started with playful (but applied) configurations. Or start with the "None (Custom)" option for a blank slate. Personalize the chat u/i and giving it a name, header (max 60 char) and a markdown description for the `README.md` file, then select from Gradio themes like Default, Soft, Glass, Monochrome, or Base.
39
 
40
+ **1b. Model Configuration**: Craft a system prompt that steers your model's behavior using a well-defined role, context and audience, code of conduct, and/or terms of engagement——think of guardrails as creative constraints. Afterward select a model ID from the menu of options, then experiment with sampling parameters, adjusting temperature (values from 0 to 2) to control response variability and/or setting a token response limit (between 50-4096) to cap output.
41
 
42
+ **1c. Example Prompts**: Add 3 to 5 starter prompts that showcase the purpose and design of your space. These examples appear as quick-start buttons for users to try and meant to help them get started.
43
 
44
+ **1d. URL Grounding**: Add up to 10 reference URLs that ground the model in the context of different webpages. The first 2 URLs function as primary sources that will always be loaded with each query, while other URLs serve as supplementary context. Note that only 4096 total characters from URLs are appended to the system prompt.
45
 
46
+ **1e. API Key and HuggingFace Token**
47
 
48
+ - Required: Provide the required OpenAI-standard API key (`sk-`) and name for its variable (`API_KEY`) to call the model through a provider like OpenRouter
49
 
50
+ - Recommended: Add a HuggingFace token (`HF_TOKEN`) to make your space customizable over time through a configuration editor
51
 
52
+ - Optional: Set an optional password (`ACCESS_CODE`) to limit who can access your space. Any value goes.
53
 
54
+ **1f. Upload `config.json`**: Done this before? Upload an existing `config.json` files to redeploy your Space with new settings and recent versions.
55
  """)
56
 
57
  with gr.Accordion("💬 Step 2: Preview Your Assistant", open=False):
 
70
  - `README.md`: Deployment instructions
71
 
72
  **Deployment Overview:** Generate Package → Create Space → Upload Files → Configure Secrets → Monitor Build → Verify
73
+
74
+ ---
75
+
76
  """)
77
 
78
+ with gr.Accordion("Step 3a: Generate & Create Space", open=True):
79
  gr.Markdown("""
80
+ **Generate Deployment Package**
81
  - Click "🗳️ Generate Deployment Package" in Configuration tab
82
  - Download the generated ZIP file
83
  - Extract files: `app.py`, `config.json`, `requirements.txt`, `README.md`
84
 
85
+ **Create New Space**
86
  - Go to [huggingface.co/spaces](https://huggingface.co/spaces)
87
  - Click "New Space"
88
  - Choose Gradio SDK (Blank)
 
109
  container=False
110
  )
111
 
112
+ with gr.Accordion("Step 3b: Upload Files", open=False):
113
  gr.Markdown("""
114
  **2.1 Upload Project Files**
115
  - Navigate to Files tab
 
138
  container=False
139
  )
140
 
141
+ with gr.Accordion("Step 3c: Configure API Secrets", open=False):
142
  gr.Markdown("""
143
+ **Configure HuggingFace Spaces Secrets**
144
  - Go to Settings → Variables and secrets
145
  - Click "New secret"
146
 
147
  **Required Secret:**
148
  - `API_KEY` (or your configured variable name)
149
  - Must start with: `sk-or-`
150
+ - Add in: *Settings**Variables and secrets*
151
 
152
  **Optional Secrets:**
153
+ - `HF_TOKEN` (Recommended): Enables persistent updates & customization
154
  - Get from: https://huggingface.co/settings/tokens
155
+ - Enable *write* permissions
156
 
157
  - `ACCESS_CODE`: Password protects your Space
158
+ - To enable add secret `ACCESS_CODE` with a custom value
159
+ - To disable delete `ACCESS_CODE` secret entirely from *Variables and Secrets*
160
  - Share with authorized users only
161
 
162
  **Access Control Notes:**
 
 
 
163
  - Do NOT set an empty value - either set a code or don't create the secret at all
164
  """)
165