Commit
·
39d7f47
1
Parent(s):
f7e1b55
update
Browse files- templates/consent.html +1 -1
- templates/experiment.html +2 -2
- templates/index.html +39 -17
- templates/introduction.html +3 -3
templates/consent.html
CHANGED
|
@@ -83,6 +83,6 @@
|
|
| 83 |
</form>
|
| 84 |
</div>
|
| 85 |
|
| 86 |
-
<p style="text-align: center; margin-top: 20px;">Your participation helps create future AI systems that can explain themselves to humans. <strong>Thank you
|
| 87 |
</body>
|
| 88 |
</html>
|
|
|
|
| 83 |
</form>
|
| 84 |
</div>
|
| 85 |
|
| 86 |
+
<p style="text-align: center; margin-top: 20px;">Your participation helps create future AI systems that can explain themselves to humans. <strong>Thank you!</strong></p>
|
| 87 |
</body>
|
| 88 |
</html>
|
templates/experiment.html
CHANGED
|
@@ -129,11 +129,11 @@
|
|
| 129 |
<div class="buttons">
|
| 130 |
<form action="{{ url_for('feedback') }}" method="post" onsubmit="showLoader()">
|
| 131 |
<input type="hidden" name="session_id" value="{{ session_id }}">
|
| 132 |
-
<button type="submit" name="prediction" value="TRUE"><h1>Statement is TRUE</h1></button>
|
| 133 |
</form>
|
| 134 |
<form action="{{ url_for('feedback') }}" method="post" onsubmit="showLoader()">
|
| 135 |
<input type="hidden" name="session_id" value="{{ session_id }}">
|
| 136 |
-
<button type="submit" name="prediction" value="FALSE"><h1>Statement is FALSE</h1></button>
|
| 137 |
</form>
|
| 138 |
</div>
|
| 139 |
</div>
|
|
|
|
| 129 |
<div class="buttons">
|
| 130 |
<form action="{{ url_for('feedback') }}" method="post" onsubmit="showLoader()">
|
| 131 |
<input type="hidden" name="session_id" value="{{ session_id }}">
|
| 132 |
+
<button type="submit" name="prediction" value="TRUE"><h1>Model will predict: Statement is TRUE</h1></button>
|
| 133 |
</form>
|
| 134 |
<form action="{{ url_for('feedback') }}" method="post" onsubmit="showLoader()">
|
| 135 |
<input type="hidden" name="session_id" value="{{ session_id }}">
|
| 136 |
+
<button type="submit" name="prediction" value="FALSE"><h1>Model will predict: Statement is FALSE</h1></button>
|
| 137 |
</form>
|
| 138 |
</div>
|
| 139 |
</div>
|
templates/index.html
CHANGED
|
@@ -139,6 +139,39 @@
|
|
| 139 |
}
|
| 140 |
</style>
|
| 141 |
<script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 142 |
function selectMethod(method) {
|
| 143 |
document.getElementById('method').value = method;
|
| 144 |
|
|
@@ -163,6 +196,11 @@
|
|
| 163 |
}
|
| 164 |
return true;
|
| 165 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 166 |
</script>
|
| 167 |
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap" rel="stylesheet">
|
| 168 |
</head>
|
|
@@ -205,23 +243,7 @@
|
|
| 205 |
<h2 style="color: #333; margin-top: 30px; margin-bottom: 20px;">Explanation Methods</h2>
|
| 206 |
|
| 207 |
<div class="method-buttons">
|
| 208 |
-
|
| 209 |
-
Chain-of-Table
|
| 210 |
-
</div>
|
| 211 |
-
<div class="method-button Plan-of-SQLs" onclick="selectMethod('Plan-of-SQLs')">
|
| 212 |
-
Plan-of-SQLs
|
| 213 |
-
</div>
|
| 214 |
-
<div class="method-button Dater" onclick="selectMethod('Dater')">
|
| 215 |
-
Dater
|
| 216 |
-
</div>
|
| 217 |
-
<div class="method-button Text2SQL" onclick="selectMethod('Text2SQL')">
|
| 218 |
-
Text2SQL
|
| 219 |
-
</div>
|
| 220 |
-
{% if show_no_xai %}
|
| 221 |
-
<div class="method-button No-XAI" onclick="selectMethod('No-XAI')">
|
| 222 |
-
No-XAI
|
| 223 |
-
</div>
|
| 224 |
-
{% endif %}
|
| 225 |
</div>
|
| 226 |
|
| 227 |
<button type="submit">Next</button>
|
|
|
|
| 139 |
}
|
| 140 |
</style>
|
| 141 |
<script>
|
| 142 |
+
function shuffleArray(array) {
|
| 143 |
+
for (let i = array.length - 1; i > 0; i--) {
|
| 144 |
+
const j = Math.floor(Math.random() * (i + 1));
|
| 145 |
+
[array[i], array[j]] = [array[j], array[i]];
|
| 146 |
+
}
|
| 147 |
+
return array;
|
| 148 |
+
}
|
| 149 |
+
|
| 150 |
+
function createMethodButtons() {
|
| 151 |
+
const methods = [
|
| 152 |
+
{ name: 'Chain-of-Table', color: '#1e90ff' },
|
| 153 |
+
{ name: 'Plan-of-SQLs', color: '#e65100' },
|
| 154 |
+
{ name: 'Text2SQL', color: '#7b1fa2' },
|
| 155 |
+
{ name: 'Dater', color: '#4caf50' },
|
| 156 |
+
{ name: 'No-XAI', color: '#ff9800' }
|
| 157 |
+
];
|
| 158 |
+
|
| 159 |
+
const shuffledMethods = shuffleArray(methods);
|
| 160 |
+
const container = document.querySelector('.method-buttons');
|
| 161 |
+
container.innerHTML = ''; // Clear existing buttons
|
| 162 |
+
|
| 163 |
+
shuffledMethods.forEach(method => {
|
| 164 |
+
if (method.name === 'No-XAI' && !{{ show_no_xai|tojson }}) {
|
| 165 |
+
return; // Skip No-XAI if not shown
|
| 166 |
+
}
|
| 167 |
+
const button = document.createElement('div');
|
| 168 |
+
button.className = `method-button ${method.name}`;
|
| 169 |
+
button.onclick = () => selectMethod(method.name);
|
| 170 |
+
button.textContent = method.name;
|
| 171 |
+
container.appendChild(button);
|
| 172 |
+
});
|
| 173 |
+
}
|
| 174 |
+
|
| 175 |
function selectMethod(method) {
|
| 176 |
document.getElementById('method').value = method;
|
| 177 |
|
|
|
|
| 196 |
}
|
| 197 |
return true;
|
| 198 |
}
|
| 199 |
+
|
| 200 |
+
// Call this function when the page loads
|
| 201 |
+
window.onload = function() {
|
| 202 |
+
createMethodButtons();
|
| 203 |
+
};
|
| 204 |
</script>
|
| 205 |
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap" rel="stylesheet">
|
| 206 |
</head>
|
|
|
|
| 243 |
<h2 style="color: #333; margin-top: 30px; margin-bottom: 20px;">Explanation Methods</h2>
|
| 244 |
|
| 245 |
<div class="method-buttons">
|
| 246 |
+
<!-- Method buttons will be dynamically inserted here -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 247 |
</div>
|
| 248 |
|
| 249 |
<button type="submit">Next</button>
|
templates/introduction.html
CHANGED
|
@@ -200,10 +200,10 @@
|
|
| 200 |
</div>
|
| 201 |
|
| 202 |
<div class="outro">
|
| 203 |
-
<h2>
|
| 204 |
<p>
|
| 205 |
-
Given
|
| 206 |
-
Your job in this Simulation task is to use the AI's explanation to guess the machine response
|
| 207 |
Specifically, please choose which response (Statement is TRUE/ Statement is FALSE) model would output regardless of whether you think that response is correct or not.
|
| 208 |
</p>
|
| 209 |
</div>
|
|
|
|
| 200 |
</div>
|
| 201 |
|
| 202 |
<div class="outro">
|
| 203 |
+
<h2>Model Simulation Task</h2>
|
| 204 |
<p>
|
| 205 |
+
Given an input statement, an Artificial Intelligence (AI) model will output either TRUE or FALSE.
|
| 206 |
+
<strong>Your job in this Simulation task is to use the AI's explanation to guess the machine response.</strong>
|
| 207 |
Specifically, please choose which response (Statement is TRUE/ Statement is FALSE) model would output regardless of whether you think that response is correct or not.
|
| 208 |
</p>
|
| 209 |
</div>
|