vrajeshbhatt's picture
added about link
054947a
<!doctype html>
<html lang="en">
<head>
<title>Model Retrain</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link href="https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700,800,900" rel="stylesheet">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="{{url_for('static',filename='css/style.css')}}">
<style>
.loading{
display: none;
}
.loader {
border: 11px solid #f3f3f3;
border-radius: 50%;
border-top: 11px solid #5356ad;
width: 70px;
height: 70px;
-webkit-animation: spin 2s linear infinite; /* Safari */
animation: spin 2s linear infinite;
}
/* Safari */
@-webkit-keyframes spin {
0% { -webkit-transform: rotate(0deg); }
100% { -webkit-transform: rotate(360deg); }
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
.btn {
cursor: pointer;
text-align: center;
margin: 0 auto;
border-radius: 2px;
width: 100px;
color: #fff;
background-color: #5356ad;
opacity: 1;
-moz-transition: all 0.5s;
-o-transition: all 0.5s;
-webkit-transition: all 0.5s;
transition: all 0.5s;
}
.btn:hover {
opacity: 0.7;
}
</style>
</head>
<body>
<div class="wrapper d-flex align-items-stretch">
<nav id="sidebar">
<div class="custom-menu">
<button type="button" id="sidebarCollapse" class="btn btn-primary">
<i class="fa fa-bars"></i>
<span class="sr-only">Toggle Menu</span>
</button>
</div>
<div class="p-4 pt-5">
<h2><a class="logo">TICKET SAMPLING</a></h2>
<ul class="list-unstyled components mb-5" style="font-family: Roboto, sans-serif;">
<li>
<a href="/">Prediction</a>
</li>
<li class="active">
<a href="/temp_retrain">Model Retrain</a>
</li>
<li>
<a href="/about">About</a>
</li>
</ul>
</div>
</nav>
<!-- Page Content -->
<div id="content" class="p-4 p-md-5 pt-5">
<p id="chooseinfo" style="margin-top:25px;">Choose your Dataset for Training!!</p>
<div class="file-upload" id="file-upload">
<form class="file-upload" action="/uploader" method="POST" enctype="multipart/form-data">
<div class="file-select">
<div class="file-select-button" id="fileName">Choose File</div>
<div class="file-select-name" id="noFile">No file chosen...</div>
<input type="file" name="file" id="file" accept=".csv,.xlsx,.xls">
</div>
<br>
<br>
<div>
<input type="submit" id="upload" class="btn" style="display: None;" name="submit" value="Upload">
</div>
</form>
</div>
<center><div id="retrain">
<center><p id="retraininfo" style="display:None;">To Retrain your Model, Click Here!!</p></center>
<form method="POST" action="/get_data">
<input type="submit" name="retrain" class="btn" style="background-color: #52ad42; display: none; position:relative; margin-top:0;" value="Retrain" onclick="spinner()">
</form>
</div></center>
<h6 id="data-file" style="display:None; margin-left:10px; margin-top:40px;">File {{f_name}} of {{row_data}} rows is chosen for Training...</h6>
<embed id='data' src="{{ url_for('data') }}"
style="border:none; display: none; width: 100%; height:480px; "
/>
<div class="loading" style="position:fixed; top:40%; left:47%;">
<center>
<div class="loader">
</div>
<h4>Training!!</h4>
</center>
</div>
<!-- <div class="progress" style="width:90%;">-->
<!-- <div id="progressBar" class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;">-->
<!-- 0%-->
<!-- </div>-->
<!-- </div>-->
<center><h3>{{result}}</h3></center>
<!-- <p id="progress"></p>-->
</div>
</div>
<script>
var percent = {{progress_count}}
</script>
<script type="text/javascript" src="//code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="{{url_for('static',filename='js/jquery.min.js')}}"></script>
<script src="{{url_for('static',filename='js/popper.js')}}"></script>
<script src="{{url_for('static',filename='js/bootstrap.min.js')}}"></script>
<script src="{{url_for('static',filename='js/main.js')}}"></script>
<script>
function spinner() {
document.getElementsByName("retrain")[0].style.display = "None";
document.getElementById("retraininfo").style.display = "None";
document.getElementById("data").style.display = "None";
document.getElementById("data-file").style.display = "None";
document.getElementsByClassName("loading")[0].style.display = "block";
document.getElementsByClassName("loading")[1].style.display = "block";
document.getElementsByClassName("loading")[2].style.display = "block";
}
$('#file').bind('change', function() {
var filename = $("#file").val();
if (/^\s*$/.test(filename)) {
$(".file-upload").removeClass('active');
$("#noFile").text("No file chosen...");
} else {
$(".file-upload").addClass('active');
$("#noFile").css("color", "green");
$("#noFile").css("fontWeight", "bold");
$("#noFile").css("fontSize", "13px");
$("#noFile").text(filename.replace("C:\\fakepath\\", ""));
document.getElementById("upload").click();
}
});
</script>
<script>
var msg = {{msg}}
if(msg == 1)
{
document.getElementById("noFile").innerHTML = "Please Select Valid File...";
document.getElementById("noFile").style.color="red";
document.getElementById("noFile").style.fontSize="13px";
document.getElementById("noFile").style.fontWeight="bold"
}
</script>
<script>
var complete = {{complete}}
if(complete == 1)
{
document.getElementsByClassName("loading")[0].style.display = "None";
}
</script>
<script>
var upload = {{upload}}
if(upload == 1)
{
document.getElementsByName("retrain")[0].style.display = "block";
document.getElementById("chooseinfo").style.display = "None";
document.getElementById("retraininfo").style.display = "block";
document.getElementById("data").style.display = "block";
document.getElementById("data-file").style.display = "block";
document.getElementsByClassName("file-select")[0].style.display = "None";
document.getElementById("file-upload").style.display = "None";
<!-- var nodes = document.getElementById("file-upload").getElementsByTagName('*');-->
<!-- for (var i = 0; i < nodes.length; i++) {-->
<!-- nodes[i].disabled = true;-->
<!-- }-->
}
</script>
<script>
if ( window.history.replaceState ) {
window.history.replaceState( null, null,"{{ url_for('temp_retrain') }}");
}
</script>
</body>
</html>