tdoehmen commited on
Commit
0577ad3
1 Parent(s): 0524e8d

show prompt template

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -26,7 +26,7 @@ def update_token_visibility(api):
26
  def update_prompt_template(prompt_format):
27
  """Update the template content when a preset is selected"""
28
  if prompt_format in PROMPT_TEMPLATES:
29
- return PROMPT_FORMATTERS[prompt_format]()
30
  return ""
31
 
32
  def handle_template_edit(prompt_format, new_template):
@@ -105,11 +105,11 @@ with gr.Blocks(gr.themes.Soft()) as demo:
105
  )
106
 
107
  # Update format dropdown when template is edited
108
- custom_prompt.change(
109
- fn=handle_template_edit,
110
- inputs=[prompt_format, custom_prompt],
111
- outputs=[prompt_format]
112
- )
113
 
114
  start_btn.click(
115
  fn=gradio_run_evaluation,
 
26
  def update_prompt_template(prompt_format):
27
  """Update the template content when a preset is selected"""
28
  if prompt_format in PROMPT_TEMPLATES:
29
+ return PROMPT_FORMATTERS[prompt_format]().PROMPT_TEMPLATE
30
  return ""
31
 
32
  def handle_template_edit(prompt_format, new_template):
 
105
  )
106
 
107
  # Update format dropdown when template is edited
108
+ # custom_prompt.change(
109
+ # fn=handle_template_edit,
110
+ # inputs=[prompt_format, custom_prompt],
111
+ # outputs=[prompt_format]
112
+ #)
113
 
114
  start_btn.click(
115
  fn=gradio_run_evaluation,