Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -73,7 +73,6 @@ def log_chat_interaction(model, tokens_used, response_time, user_message_length)
|
|
| 73 |
def get_template_prompt(template_name):
|
| 74 |
"""Get system prompt for a given template name"""
|
| 75 |
templates = {
|
| 76 |
-
"": "", # Empty template
|
| 77 |
"General Assistant": "You are a helpful, harmless, and honest AI assistant.",
|
| 78 |
"Code Helper": "You are a programming assistant. Provide detailed code explanations and examples.",
|
| 79 |
"Creative Writer": "You are a creative writing assistant. Generate engaging and imaginative content.",
|
|
@@ -253,7 +252,7 @@ models = [
|
|
| 253 |
]
|
| 254 |
|
| 255 |
# Define templates
|
| 256 |
-
templates = ["
|
| 257 |
|
| 258 |
# Create the Gradio interface
|
| 259 |
with gr.Blocks(title="Groq AI Chat Playground") as app:
|
|
@@ -325,7 +324,7 @@ with gr.Blocks(title="Groq AI Chat Playground") as app:
|
|
| 325 |
template_dropdown = gr.Dropdown(
|
| 326 |
choices=templates,
|
| 327 |
label="Select Template",
|
| 328 |
-
value=""
|
| 329 |
)
|
| 330 |
|
| 331 |
with gr.Row():
|
|
|
|
| 73 |
def get_template_prompt(template_name):
|
| 74 |
"""Get system prompt for a given template name"""
|
| 75 |
templates = {
|
|
|
|
| 76 |
"General Assistant": "You are a helpful, harmless, and honest AI assistant.",
|
| 77 |
"Code Helper": "You are a programming assistant. Provide detailed code explanations and examples.",
|
| 78 |
"Creative Writer": "You are a creative writing assistant. Generate engaging and imaginative content.",
|
|
|
|
| 252 |
]
|
| 253 |
|
| 254 |
# Define templates
|
| 255 |
+
templates = ["General Assistant", "Code Helper", "Creative Writer", "Technical Expert", "Data Analyst"]
|
| 256 |
|
| 257 |
# Create the Gradio interface
|
| 258 |
with gr.Blocks(title="Groq AI Chat Playground") as app:
|
|
|
|
| 324 |
template_dropdown = gr.Dropdown(
|
| 325 |
choices=templates,
|
| 326 |
label="Select Template",
|
| 327 |
+
value="General Assistant"
|
| 328 |
)
|
| 329 |
|
| 330 |
with gr.Row():
|