Skip to content

Commit

Permalink
Adding expected category to table
Browse files Browse the repository at this point in the history
  • Loading branch information
carlyrichmond committed Apr 22, 2024
1 parent 371fff2 commit 6d2e1ec
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ function ClassifierTableRow(props) {
<th>
<img className="image" alt="Random image" src={props.result.image_url} />
</th>
<th className="classification">{ props.result.expected_category }</th>
<th className="classification">{ props.result.user_category }</th>
<th className="classification">{ formatClassificationCollections(props.result.models.mobilenet_classifier, 'className') }</th>
<th className="classification">{ formatClassificationCollections(props.result.models?.coco_ssd_predictions, 'class') }</th>
Expand Down
1 change: 1 addition & 0 deletions cake-game/src/routes/end/End.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ function End() {
<thead className="table-header">
<tr className="header-row">
<th>Image</th>
<th>Expected</th>
<th>You</th>
<th>MobileNet</th>
<th>COCO-SSD</th>
Expand Down
2 changes: 1 addition & 1 deletion cake-game/src/util/elasticsearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export async function saveUserClassification(userClassification) {
export async function getGameResults(gameMetadata) {
return await client.search({
index: userClassificationsIndex,
_source: ["image_url", "user_category", "models"],
_source: ["image_url", "expected_category", "user_category", "models"],
query: {
match: {
game_id: gameMetadata.game_id
Expand Down

0 comments on commit 6d2e1ec

Please sign in to comment.