sergiopaniego HF Staff commited on
Commit
ee7d701
·
verified ·
1 Parent(s): b22f824

Rendering markdown in 2nd tab!

Browse files
Files changed (1) hide show
  1. utils.py +2 -1
utils.py CHANGED
@@ -64,7 +64,8 @@ def display_example_responses_html(evaluation_data, responses, models, example_i
64
  responses_html = ""
65
  for model in models:
66
  response = responses[model].get(example_id, "(No response)")
67
- responses_html += f'<p style="margin: 0 0 8px;"><strong style="color: #495057;">{model}:</strong> {response}</p>'
 
68
 
69
  html = f"""
70
  <div style="display: flex; margin-bottom: 20px; align-items: flex-start;">
 
64
  responses_html = ""
65
  for model in models:
66
  response = responses[model].get(example_id, "(No response)")
67
+ response_html = markdown.markdown(response, extensions=['fenced_code', 'codehilite'])
68
+ responses_html += f'<p style="margin: 0 0 8px;"><strong style="color: #495057;">{model}:</strong> {response_html}</p>'
69
 
70
  html = f"""
71
  <div style="display: flex; margin-bottom: 20px; align-items: flex-start;">