milwright commited on
Commit
3e646c4
·
1 Parent(s): 4573512

tidy up docs and clarify some points; /img refs soon

Browse files
Files changed (1) hide show
  1. support_docs.py +12 -41
support_docs.py CHANGED
@@ -32,59 +32,30 @@ def create_support_docs():
32
  gr.Markdown("""
33
  ### Configuration Tab Sections
34
 
35
- **1. Templates**
36
 
37
- 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.
38
 
39
- **2. Identity**
40
-
41
- 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.
42
-
43
- **3. Configuration**
44
-
45
- Configuration is where you define your assistant's behavior. Start by crafting a system prompt that governs your model's behavior through specific, well-structured instructions that act as guardrails. You can select from stock models or browse the full OpenRouter catalogue to power your space. Fine-tune the model with sampling parameters: adjust temperature (values from 0 to 2) to control response variability and/or set the token output limit (between 50-4096) to shorten up responses.
46
-
47
- **4. Example Prompts**
48
-
49
- The Example Prompts section allows you to 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. Manage these examples using the ➕/➖ buttons to add or remove them as your assistant evolves.
50
-
51
- **5. URL Grounding**
52
 
53
- Add up to 10 reference URLs that provide important context for the model. The first 2 URLs function as primary sources that will always be loaded with each query, while secondary URLs serve as supplementary sources. Note: only the first 4096 characters of URL pages are fetched and incorporated into the context window of the model.
54
 
55
  **6. API Key and HuggingFace Token**
56
 
57
- - 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
58
- - Recommended: Add a HuggingFace token (HF_TOKEN) to make your space customizable over time through a configuration editor
59
- - Optional: Set an optional password (ACCESS_CODE) to limit access to your space
 
 
60
 
61
  **7. Upload Configuration**
62
 
63
- The Upload Configuration section streamlines the setup process by letting you import existing config.json files to quickly configure your Space with previously saved settings. This feature enables you to quickly restore previous configurations without manual recreation, saving time when deploying multiple similar assistants or recovering a previous version.
64
  """)
65
 
66
  with gr.Accordion("💬 Step 2: Preview Your Assistant", open=False):
67
  gr.Markdown("""
68
- ### Preview Tab Features
69
-
70
- **Interactive Testing**
71
- - Test your config with real-time requests
72
- - See how your assistant responds to different inputs
73
-
74
- **Available Features**
75
- - Test with example prompts (click to try)
76
- - Upload files for processing (if enabled)
77
- - Export complete conversation history
78
- - Review your active configuration settings
79
-
80
- **Secret Key Setup**
81
- - Default variable name: `API_KEY`
82
- - OpenAI-standard API key as environment variable: `sk-<your_key>`
83
-
84
- **Testing Best Practices:**
85
- - Try diverse query types to verify response quality
86
- - Measure awareness of uploaded files and URL grounding
87
- - Probe multiple models with the same system prompt
88
  """)
89
 
90
  with gr.Accordion("🤗 Creating a HuggingFace Account", open=False):
@@ -121,7 +92,7 @@ def create_support_docs():
121
  **Key Points:**
122
  - Spaces are free to create and host
123
  - Each Space gets a unique URL to share
124
- - No installation required for end users
125
  """)
126
 
127
  with gr.Accordion("🗳️ Step 3: Generate & Deploy", 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 Configuration**
52
 
53
+ Streamlines the setup process by letting you import existing config.json files to quickly configure your Space with previously saved settings.
54
  """)
55
 
56
  with gr.Accordion("💬 Step 2: Preview Your Assistant", open=False):
57
  gr.Markdown("""
58
+ In the Preview tab test your assistant with real-time requests, try example prompts, upload files if enabled, and export your conversation history. Tinker with a variety of queries, models, and configurations to find the most appropriate fit for you and your people.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
  """)
60
 
61
  with gr.Accordion("🤗 Creating a HuggingFace Account", open=False):
 
92
  **Key Points:**
93
  - Spaces are free to create and host
94
  - Each Space gets a unique URL to share
95
+ - No sign up or installation required for end users!!
96
  """)
97
 
98
  with gr.Accordion("🗳️ Step 3: Generate & Deploy", open=False):