Martín Santillán Cooper commited on
Commit
baad5d9
1 Parent(s): 324e397

fix show prompt formatting

Browse files
Files changed (1) hide show
  1. src/app.py +1 -0
src/app.py CHANGED
@@ -73,6 +73,7 @@ def on_show_prompt_click(criteria, context, user_message, assistant_message, sta
73
  messages = get_messages(test_case=test_case, sub_catalog_name=state['selected_sub_catalog'])
74
  prompt = get_prompt(messages, criteria_name)
75
  prompt = json.dumps(prompt, indent=4)
 
76
  return gr.Markdown(prompt)
77
 
78
  ibm_blue = gr.themes.Color(
 
73
  messages = get_messages(test_case=test_case, sub_catalog_name=state['selected_sub_catalog'])
74
  prompt = get_prompt(messages, criteria_name)
75
  prompt = json.dumps(prompt, indent=4)
76
+ prompt = prompt.replace('<', '&lt;').replace('>', '&gt;').replace('\\n', '<br>')
77
  return gr.Markdown(prompt)
78
 
79
  ibm_blue = gr.themes.Color(