Spaces:
Runtime error
Runtime error
<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> |