AndyC commited on
Commit
993e246
·
1 Parent(s): 2bb36fc

added description

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -229,7 +229,7 @@ def run(
229
  }
230
 
231
  # Determine which system prompt to use
232
- if system_prompt_preset == "Custom":
233
  system_prompt = custom_system_prompt
234
  else:
235
  system_prompt = preset_prompts.get(system_prompt_preset, custom_system_prompt)
@@ -299,16 +299,16 @@ demo = gr.ChatInterface(
299
  "Educational Tutor",
300
  "Technical Reviewer",
301
  "Creative Storyteller",
302
- "Custom"
303
  ],
304
  value="General Assistant",
305
- info="Choose a preset or select 'Custom' to write your own"
306
  ),
307
  gr.Textbox(
308
  label="Custom System Prompt",
309
  value="You are a helpful AI assistant capable of analyzing images, videos, and PDF documents. Provide clear, accurate, and helpful responses to user queries.",
310
  lines=3,
311
- info="Edit this field when 'Custom' is selected above, or modify any preset"
312
  ),
313
  gr.Dropdown(
314
  label="Model",
@@ -350,7 +350,7 @@ def update_custom_prompt(preset_choice):
350
 
351
  "Creative Storyteller": "You are a creative storyteller who brings visual content to life through engaging narratives. When analyzing images or videos, create compelling stories, describe scenes with rich detail, and help users explore the creative and emotional aspects of visual content.",
352
 
353
- "Custom": ""
354
  }
355
 
356
  return preset_prompts.get(preset_choice, "")
 
229
  }
230
 
231
  # Determine which system prompt to use
232
+ if system_prompt_preset == "Custom Prompt":
233
  system_prompt = custom_system_prompt
234
  else:
235
  system_prompt = preset_prompts.get(system_prompt_preset, custom_system_prompt)
 
299
  "Educational Tutor",
300
  "Technical Reviewer",
301
  "Creative Storyteller",
302
+ "Custom Prompt"
303
  ],
304
  value="General Assistant",
305
+ info="System prompts define the AI's role and behavior. Choose a preset that matches your task, or select 'Custom Prompt' to write your own specialized instructions."
306
  ),
307
  gr.Textbox(
308
  label="Custom System Prompt",
309
  value="You are a helpful AI assistant capable of analyzing images, videos, and PDF documents. Provide clear, accurate, and helpful responses to user queries.",
310
  lines=3,
311
+ info="Edit this field when 'Custom Prompt' is selected above, or modify any preset"
312
  ),
313
  gr.Dropdown(
314
  label="Model",
 
350
 
351
  "Creative Storyteller": "You are a creative storyteller who brings visual content to life through engaging narratives. When analyzing images or videos, create compelling stories, describe scenes with rich detail, and help users explore the creative and emotional aspects of visual content.",
352
 
353
+ "Custom Prompt": ""
354
  }
355
 
356
  return preset_prompts.get(preset_choice, "")