Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -242,6 +242,14 @@ with gr.Blocks(theme=theme, title="Stanford Soft Raccoon Chat", css=css) as demo
|
|
242 |
label="Top-P"
|
243 |
)
|
244 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
245 |
# Create the ChatInterface
|
246 |
chat_interface = gr.ChatInterface(
|
247 |
fn=chat_model,
|
@@ -250,11 +258,7 @@ with gr.Blocks(theme=theme, title="Stanford Soft Raccoon Chat", css=css) as demo
|
|
250 |
type="messages", # This is important for compatibility
|
251 |
title="Stanford Soft Raccoon Chat",
|
252 |
description="AI assistant powered by the Soft Raccoon language model",
|
253 |
-
examples=
|
254 |
-
"Tell me about Stanford University",
|
255 |
-
"How can I learn about artificial intelligence?",
|
256 |
-
"What's your favorite book?"
|
257 |
-
],
|
258 |
cache_examples=True,
|
259 |
)
|
260 |
|
|
|
242 |
label="Top-P"
|
243 |
)
|
244 |
|
245 |
+
# Create the ChatInterface with properly formatted examples
|
246 |
+
# Each example is a list: [message, temperature, top_p]
|
247 |
+
examples_with_params = [
|
248 |
+
["Tell me about Stanford University", 0.7, 0.9],
|
249 |
+
["How can I learn about artificial intelligence?", 0.8, 0.95],
|
250 |
+
["What's your favorite book?", 0.6, 0.85]
|
251 |
+
]
|
252 |
+
|
253 |
# Create the ChatInterface
|
254 |
chat_interface = gr.ChatInterface(
|
255 |
fn=chat_model,
|
|
|
258 |
type="messages", # This is important for compatibility
|
259 |
title="Stanford Soft Raccoon Chat",
|
260 |
description="AI assistant powered by the Soft Raccoon language model",
|
261 |
+
examples=examples_with_params,
|
|
|
|
|
|
|
|
|
262 |
cache_examples=True,
|
263 |
)
|
264 |
|