Spaces:
Runtime error
Runtime error
File size: 5,257 Bytes
8ea4c8e db380b4 8ea4c8e 40cdf6a 8ea4c8e db380b4 8ea4c8e 40cdf6a db380b4 8ea4c8e 40cdf6a db380b4 8ea4c8e 40cdf6a 8ea4c8e db380b4 8ea4c8e 40cdf6a db380b4 3b0faf1 db380b4 3b0faf1 db380b4 3b0faf1 db380b4 3b0faf1 40cdf6a 8ea4c8e db380b4 8ea4c8e db380b4 8ea4c8e 3b0faf1 8ea4c8e 3b0faf1 8ea4c8e d904caa db380b4 ff51625 8ea4c8e a834038 8ea4c8e 40cdf6a db380b4 40cdf6a db380b4 40cdf6a 8ea4c8e 3b0faf1 8ea4c8e ff51625 40cdf6a 8ea4c8e ff51625 40cdf6a 8ea4c8e ff51625 8ea4c8e 59259da |
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 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 |
<!DOCTYPE html>
<html>
<head>
<title>Experiment</title>
<style>
body {
font-family: 'Roboto', sans-serif;
background: url('/static/images/background.jpg') no-repeat center center fixed;
background-size: cover;
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
}
.container {
background-color: #ffffff;
padding: 20px;
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
width: 98%;
height: 98vh;
margin: 0;
text-align: center;
display: flex;
flex-direction: column;
}
h1, h2 {
color: #000000;
font-size: 20px;
margin: 10px 0;
}
p {
color: #000000;
font-size: 16px;
margin: 5px 0;
}
.visualization-container {
display: flex;
justify-content: space-between;
flex: 1;
margin: 10px 0;
}
.visualization {
width: 49%;
height: calc(100vh - 250px);
border: 1px solid #ddd;
border-radius: 5px;
overflow: hidden;
}
.question-box {
background-color: #f0f0f0;
padding: 10px;
border-radius: 10px;
margin: 10px 0;
}
.question-text {
font-size: 18px;
font-weight: bold;
color: #333;
}
.buttons {
display: flex;
justify-content: space-between;
}
button {
color: white;
padding: 10px 20px;
border: none;
border-radius: 5px;
cursor: pointer;
font-size: 16px;
margin-top: 10px;
width: 48%;
transition: background-color 0.3s ease;
}
button:hover {
opacity: 0.9;
}
button[value="No-XAI"] {
background-color: gray;
}
button[value="Dater"] {
background-color: purple;
}
button[value="Chain-of-Table"] {
background-color: blue;
}
button[value="Plan-of-SQLs"] {
background-color: green;
}
iframe {
width: 100%;
height: 100%;
border: none;
}
.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%;
transform: translate(-50%, -50%);
display: none;
z-index: 1000;
}
@keyframes spin {
0% { transform: translate(-50%, -50%) rotate(0deg); }
100% { transform: translate(-50%, -50%) rotate(360deg); }
}
.overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
display: none;
z-index: 999;
}
</style>
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap" rel="stylesheet">
</head>
<body>
<div class="container">
<h1>{{ sample_id + 1 }} / 10</h1>
<p><strong>Task description:</strong> {{ statement }}</p>
<div class="visualization-container">
<div class="visualization">
<h2>{{ method_a }}</h2>
<iframe src="{{ visualization_a }}" frameborder="0"></iframe>
</div>
<div class="visualization">
<h2>{{ method_b }}</h2>
<iframe src="{{ visualization_b }}" frameborder="0"></iframe>
</div>
</div>
<div class="question-box">
<p class="question-text">Which explanation provides a clearer and more accurate reasoning process?</p>
</div>
<div class="buttons">
<form action="{{ url_for('feedback') }}" method="post" style="width: 48%;" onsubmit="showLoader()">
<input type="hidden" name="session_id" value="{{ session_id }}">
<button type="submit" name="feedback" value="{{ method_a }}">{{ method_a }}</button>
</form>
<form action="{{ url_for('feedback') }}" method="post" style="width: 48%;" onsubmit="showLoader()">
<input type="hidden" name="session_id" value="{{ session_id }}">
<button type="submit" name="feedback" value="{{ method_b }}">{{ method_b }}</button>
</form>
</div>
</div>
<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> |