Skip to content

Commit

Permalink
Refactor results section to display ground truth and prediction separ…
Browse files Browse the repository at this point in the history
…ately
  • Loading branch information
kieranklaassen committed Aug 22, 2024
1 parent 5b75a60 commit 0323f90
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion app/views/leva/workbench/_results_section.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,14 @@
<div class="bg-gray-800 p-4 rounded-lg mb-5 shadow-md">
<h3 class="text-sm font-semibold mb-2 text-indigo-300">Run Result</h3>
<% if @dataset_record && (runner_result = @dataset_record.runner_results.last) %>
<p class="text-sm text-gray-300"><%= runner_result.prediction %></p>
<div class="mb-3">
<h4 class="text-xs font-semibold text-indigo-200 mb-1">Ground Truth:</h4>
<p class="text-sm text-gray-300"><%= @dataset_record.ground_truth %></p>
</div>
<div>
<h4 class="text-xs font-semibold text-indigo-200 mb-1">Prediction:</h4>
<p class="text-sm text-gray-300"><%= runner_result.prediction %></p>
</div>
<div class="flex justify-between items-center mt-2 text-xs text-gray-500">
<p>Prompt version: <%= runner_result.prompt.version %></p>
<p>Run <%= time_ago_in_words(runner_result.created_at) %> ago</p>
Expand Down

0 comments on commit 0323f90

Please sign in to comment.