Skip to content

Commit

Permalink
Display Version Info from API (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
bbengfort authored Nov 19, 2022
1 parent 6cafec1 commit 184a3fe
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
4 changes: 4 additions & 0 deletions static/css/dataspace.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ body {
line-height: 60px;
}

#versionStatus {
margin-right: 2px;
}

body > .container {
padding: 40px 15px 0;
}
Expand Down
12 changes: 12 additions & 0 deletions static/js/dataspace.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,10 +224,22 @@ class Dataspace {

return grid;
}
}

function versionCheck() {
$.get("/status").then((data) => {
console.log(data);
if (data.status == 'ok') {
$("#versionStatus").removeClass("text-danger").addClass("text-success");
$("#versionInfo").text(data.version);
}
});
}

$(document).ready(function() {
// Perform version check
versionCheck();

// Create the dataspace app
app = new Dataspace("#dataspace");

Expand Down
7 changes: 6 additions & 1 deletion templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@
Made with &spades; by <a href="https://github.com/bbengfort">@bbengfort</a>
for the Georgetown Data Science Certificate
</span>
<span class="text-muted pull-right">For Demonstration Purposes Only.</span>
<span class="text-muted pull-right"><span id="versionStatus" class="text-danger">&#9679;</span><span id="versionInfo"></span></span>
</div>
</footer>

Expand All @@ -447,10 +447,15 @@ <h5 class="modal-title" id="aboutModalLabel">About Data Space</h5>
selecting a dataset or by creating one of your own, you can fit a model to the data
and see how the model would make decisions based on the data it has been trained on.
The fitted contours display the highest likelihoods of the class the model would select.
</p>
<p>
Although this is a toy example, hopefully it helps give you the intuition that the
machine learning process is a model selection search for the best combination of features,
algorithm, and hyperparameter that generalize well in a bounded feature space.
</p>
<p>
This application is for demonstration purposes only.
</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
Expand Down

0 comments on commit 184a3fe

Please sign in to comment.