File size: 4,084 Bytes
fa53be0 69d37ef 5d0030d 69d37ef 9eb7cee fa53be0 69d37ef fa53be0 5d0030d fa53be0 9eb7cee de7b716 0b2d6d0 fa53be0 9eb7cee de7b716 0b2d6d0 fa53be0 9eb7cee fa53be0 fafbcc3 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 |
<!DOCTYPE html>
<html>
<head>
<title>Experiment</title>
<style>
body, html {
margin: 0;
padding: 0;
height: 100%;
font-family: 'Roboto', sans-serif;
}
.container {
display: flex;
flex-direction: column;
height: 100vh;
width: 100vw;
background-color: #ffffff;
}
.header {
padding: 20px;
background-color: #f0f0f0;
text-align: center;
}
h1 {
margin: 0;
font-size: 24px;
}
.task-description {
padding: 10px 20px;
background-color: #e0e0e0;
text-align: center;
}
.visualization-container {
flex-grow: 1;
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;
}
iframe {
width: 100%;
height: 100%;
border: none;
}
.buttons {
display: flex;
justify-content: space-around;
padding: 20px;
background-color: #f0f0f0;
}
button {
background-color: #4CAF50;
color: white;
padding: 15px 30px;
border: none;
border-radius: 5px;
cursor: pointer;
font-size: 18px;
transition: background-color 0.3s ease;
}
button:hover {
background-color: #45a049;
}
button.reject {
background-color: #f44336;
}
button.reject:hover {
background-color: #e53935;
}
/* Loader styles */
.overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
display: none;
z-index: 1000;
}
.loader {
border: 5px solid #f3f3f3;
border-top: 5px solid #3498db;
border-radius: 50%;
width: 50px;
height: 50px;
animation: spin 1s linear infinite;
position: fixed;
top: 50%;
left: 50%;
margin-top: -25px;
margin-left: -25px;
display: none;
z-index: 1001;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
</style>
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap" rel="stylesheet">
</head>
<body>
<div class="container">
<div class="header">
<h1>{{ sample_id + 1 }} / 10</h1>
</div>
<div class="task-description">
<p><strong>Task description:</strong> {{ statement }}</p>
</div>
<div class="visualization-container">
<iframe src="{{ visualization }}"></iframe>
</div>
<div class="buttons">
<form action="{{ url_for('feedback') }}" method="post" onsubmit="showLoader()">
<input type="hidden" name="session_id" value="{{ session_id }}">
<button type="submit" name="prediction" value="TRUE">Model will predict TRUE</button>
</form>
<form action="{{ url_for('feedback') }}" method="post" onsubmit="showLoader()">
<input type="hidden" name="session_id" value="{{ session_id }}">
<button type="submit" name="prediction" value="FALSE" class="reject">Model will predict FALSE</button>
</form>
</div>
</div>
<!-- Loader and overlay -->
<div class="overlay" id="overlay"></div>
<div class="loader" id="loader"></div>
<script>
function showLoader() {
document.getElementById('overlay').style.display = 'block';
document.getElementById('loader').style.display = 'block';
}
</script>
</body>
</html> |