diff --git a/docs/assets/images/favicon.png b/docs/assets/images/favicon.png
new file mode 100644
index 0000000..ce932e8
Binary files /dev/null and b/docs/assets/images/favicon.png differ
diff --git a/docs/assets/images/panel-logo.png b/docs/assets/images/panel-logo.png
new file mode 100644
index 0000000..12f36ad
Binary files /dev/null and b/docs/assets/images/panel-logo.png differ
diff --git a/docs/index.md b/docs/index.md
index 4e65f48..0d56227 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -1,5 +1,5 @@
-# Examples
+# Panel Chat Examples
To run all of these examples locally:
@@ -10,9 +10,11 @@ pip install hatch
hatch run panel-serve
```
-Note the default installation is not optimized for GPU usage. To enable GPU support for local
-models (i.e. not OpenAI), install `ctransformers` with the proper backend and modify the
-scripts configs' accordingly, e.g. `n_gpu_layers=1` for a single GPU.
+!!! note
+ Note the default installation is not optimized for GPU usage. To **enable
+ GPU support** for local models (i.e. not OpenAI), install `ctransformers`
+ with the proper backend and modify the
+ scripts configs' accordingly, e.g. `n_gpu_layers=1` for a single GPU.
## Basics
@@ -56,9 +58,11 @@ chat_interface.servable()
### Echo Stream
-Demonstrates how to use the `ChatInterface` and a `callback` function to stream back responses.
+Demonstrates how to use the `ChatInterface` and a `callback` function to stream back
+responses.
-The chatbot Assistant echoes back the message entered by the User in a *streaming* fashion.
+The chatbot Assistant echoes back the message entered by the User in a *streaming*
+fashion.
[](examples/basics/echo_stream.py)
@@ -66,9 +70,11 @@ The chatbot Assistant echoes back the message entered by the User in a *streamin
Source code for echo_stream.py
```python
"""
-Demonstrates how to use the `ChatInterface` and a `callback` function to stream back responses.
+Demonstrates how to use the `ChatInterface` and a `callback` function to stream back
+responses.
-The chatbot Assistant echoes back the message entered by the User in a *streaming* fashion.
+The chatbot Assistant echoes back the message entered by the User in a *streaming*
+fashion.
"""
@@ -466,7 +472,8 @@ MODEL_KWARGS = {
}
llm_chains = {}
-TEMPLATE = """[INST] You are a friendly chat bot who's willing to help answer the user:
+TEMPLATE = """[INST] You are a friendly chat bot who's willing to help answer the
+user:
{user_input} [/INST]
"""
diff --git a/mkdocs.yml b/mkdocs.yml
index c941694..06bbeeb 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -1,18 +1,19 @@
site_name: Panel Chat Examples
-site_description: Example recipes for Panel ChatInterface.
+site_description: Example recipes for Panel Chat Components
repo_url: https://github.com/holoviz-topics/panel-chat-examples
repo_name: holoviz-topics/panel-chat-examples
theme:
name: material
- icon:
- logo: material/library
+ logo: 'assets/images/panel-logo.png'
+ features:
+ - content.copy.code
palette:
# Palette toggle for light mode
- media: "(prefers-color-scheme: light)"
scheme: default
- primary: grey
+ primary: white
accent: blue
toggle:
icon: material/brightness-7
@@ -21,7 +22,7 @@ theme:
# Palette toggle for dark mode
- media: "(prefers-color-scheme: dark)"
scheme: slate
- primary: grey
+ primary: black
accent: blue
toggle:
icon: material/brightness-4
@@ -37,6 +38,7 @@ markdown_extensions:
- pymdownx.inlinehilite
- pymdownx.snippets
- pymdownx.superfences
+ - admonition
plugins:
- search
@@ -53,4 +55,4 @@ watch:
- panel_chat_examples
nav:
- - Examples: index.md
+ - Panel Chat Examples: index.md
diff --git a/scripts/generate_gallery.py b/scripts/generate_gallery.py
index 143e257..51338f4 100644
--- a/scripts/generate_gallery.py
+++ b/scripts/generate_gallery.py
@@ -21,7 +21,7 @@ def run():
text = dedent(
"""
- # Examples
+ # Panel Chat Examples
To run all of these examples locally:
@@ -33,10 +33,11 @@ def run():
hatch run panel-serve
```
- Note the default installation is not optimized for GPU usage. To enable GPU
- support for local models (i.e. not OpenAI), install `ctransformers` with the
- proper backend and modify the scripts configs' accordingly, e.g.
- `n_gpu_layers=1` for a single GPU.
+ !!! note
+ Note the default installation is not optimized for GPU usage. To **enable
+ GPU support** for local models (i.e. not OpenAI), install `ctransformers`
+ with the proper backend and modify the
+ scripts configs' accordingly, e.g. `n_gpu_layers=1` for a single GPU.
"""
)
for folder in sorted(EXAMPLES_PATH.glob("**/"), key=lambda folder: folder.name):