luulinh90s commited on
Commit
174b5e1
·
1 Parent(s): 3b882cd
templates/attribution.html CHANGED
@@ -1,27 +1,87 @@
1
  <!DOCTYPE html>
2
- <html lang="en">
3
  <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>TableQA Example with Highlighted Explanations</title>
7
  <style>
8
- body { font-family: Arial, sans-serif; line-height: 1.6; margin: 0; padding: 20px; }
9
- .container { max-width: 800px; margin: 0 auto; }
10
- table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
11
- th, td { border: 1px solid #ddd; padding: 8px; text-align: left; }
12
- th { background-color: #f2f2f2; }
13
- .highlight { background-color: #ffffcc; }
14
- .explanation { background-color: #f0f0f0; padding: 15px; border-radius: 5px; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  </style>
16
  </head>
17
  <body>
18
  <div class="container">
19
- <h1>TableQA Example with Highlighted Explanations</h1>
20
-
21
- <h2>Statement to Verify:</h2>
22
- <p>"The Wildcats kept the opposing team scoreless in four games."</p>
23
-
24
- <h2>Input Table: 1947 Kentucky Wildcats Football Team</h2>
 
 
25
  <table>
26
  <tr>
27
  <th>Game</th>
@@ -50,15 +110,6 @@
50
  <td class="highlight">0</td>
51
  <td>1 - 1</td>
52
  </tr>
53
- <tr>
54
- <td>3</td>
55
- <td>9999-10-04</td>
56
- <td>Xavier</td>
57
- <td>Win</td>
58
- <td>20</td>
59
- <td>7</td>
60
- <td>2 - 1</td>
61
- </tr>
62
  <tr class="highlight">
63
  <td>4</td>
64
  <td>9999-10-11</td>
@@ -77,33 +128,6 @@
77
  <td class="highlight">0</td>
78
  <td>4 - 1 , 14</td>
79
  </tr>
80
- <tr>
81
- <td>6</td>
82
- <td>9999-10-25</td>
83
- <td>Michigan State</td>
84
- <td>Win</td>
85
- <td>7</td>
86
- <td>6</td>
87
- <td>5 - 1 , 13</td>
88
- </tr>
89
- <tr>
90
- <td>7</td>
91
- <td>9999-11-01</td>
92
- <td>18 Alabama</td>
93
- <td>Loss</td>
94
- <td>0</td>
95
- <td>13</td>
96
- <td>5 - 2</td>
97
- </tr>
98
- <tr>
99
- <td>8</td>
100
- <td>9999-11-08</td>
101
- <td>West Virginia</td>
102
- <td>Win</td>
103
- <td>15</td>
104
- <td>6</td>
105
- <td>6 - 2</td>
106
- </tr>
107
  <tr class="highlight">
108
  <td>9</td>
109
  <td>9999-11-15</td>
@@ -113,34 +137,21 @@
113
  <td class="highlight">0</td>
114
  <td>7 - 2</td>
115
  </tr>
116
- <tr>
117
- <td>10</td>
118
- <td>9999-11-22</td>
119
- <td>Tennessee</td>
120
- <td>Loss</td>
121
- <td>6</td>
122
- <td>13</td>
123
- <td>7 - 3</td>
124
- </tr>
125
  </table>
126
-
127
- <h2>Prediction: TRUE</h2>
128
-
129
- <div class="explanation">
130
- <h3>Explanation of Highlighted Cells:</h3>
131
- <p>In this example, the TableQA system has highlighted specific cells to explain its reasoning:</p>
132
- <ul>
133
- <li>The entire rows for games 2, 4, 5, and 9 are highlighted in yellow.</li>
134
- <li>Within these rows, the "Opponents" column cells containing "0" are highlighted with a deeper yellow.</li>
135
- </ul>
136
- <p>These highlights indicate that:</p>
137
- <ol>
138
- <li>The system identified four games where the opposing team did not score (Games 2, 4, 5, and 9).</li>
139
- <li>The system specifically focused on the "Opponents" column to determine when the opposing team was kept scoreless.</li>
140
- <li>By highlighting these cells, the system is showing us the exact data points it used to verify the statement "The Wildcats kept the opposing team scoreless in four games."</li>
141
- </ol>
142
- <p>This type of explanation helps users understand which parts of the data were most relevant to the system's decision-making process, increasing transparency and trust in the system's output.</p>
143
- </div>
144
  </div>
145
  </body>
146
  </html>
 
1
  <!DOCTYPE html>
2
+ <html>
3
  <head>
4
+ <title>Attribution Explanations in TableQA</title>
 
 
5
  <style>
6
+ body {
7
+ font-family: 'Roboto', sans-serif;
8
+ background: url('/static/images/background.jpg') no-repeat center center fixed;
9
+ background-size: cover;
10
+ display: flex;
11
+ justify-content: center;
12
+ align-items: center;
13
+ min-height: 100vh;
14
+ margin: 0;
15
+ padding: 20px;
16
+ }
17
+ .container {
18
+ text-align: center;
19
+ background-color: #ffffff;
20
+ padding: 40px;
21
+ border-radius: 10px;
22
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
23
+ width: 80%;
24
+ max-width: 1000px;
25
+ }
26
+ h1 {
27
+ color: #000000;
28
+ font-size: 36px;
29
+ margin-bottom: 20px;
30
+ }
31
+ h2 {
32
+ color: #333;
33
+ font-size: 24px;
34
+ margin-top: 30px;
35
+ margin-bottom: 15px;
36
+ }
37
+ p {
38
+ font-size: 18px;
39
+ color: #333;
40
+ margin-bottom: 20px;
41
+ text-align: left;
42
+ }
43
+ table {
44
+ width: 100%;
45
+ border-collapse: collapse;
46
+ margin-bottom: 20px;
47
+ }
48
+ th, td {
49
+ border: 1px solid #ddd;
50
+ padding: 8px;
51
+ text-align: left;
52
+ }
53
+ th {
54
+ background-color: #f2f2f2;
55
+ }
56
+ .highlight {
57
+ background-color: #ffffcc;
58
+ }
59
+ button {
60
+ background-color: #4CAF50;
61
+ color: white;
62
+ padding: 15px 30px;
63
+ border: none;
64
+ border-radius: 5px;
65
+ cursor: pointer;
66
+ font-size: 24px;
67
+ transition: background-color 0.3s ease;
68
+ margin-top: 20px;
69
+ }
70
+ button:hover {
71
+ background-color: #45a049;
72
+ }
73
  </style>
74
  </head>
75
  <body>
76
  <div class="container">
77
+ <h1>Understanding Attribution Explanations</h1>
78
+ <p>
79
+ Attribution explanations highlight specific parts of a table—such as rows, columns, or cells—that are most relevant to the answer provided by a TableQA system. These explanations help you understand which data points the system considered important when generating the answer.
80
+ </p>
81
+ <h2>Example: 1947 Kentucky Wildcats Football Team</h2>
82
+ <p>
83
+ Statement to verify: "The Wildcats kept the opposing team scoreless in four games."
84
+ </p>
85
  <table>
86
  <tr>
87
  <th>Game</th>
 
110
  <td class="highlight">0</td>
111
  <td>1 - 1</td>
112
  </tr>
 
 
 
 
 
 
 
 
 
113
  <tr class="highlight">
114
  <td>4</td>
115
  <td>9999-10-11</td>
 
128
  <td class="highlight">0</td>
129
  <td>4 - 1 , 14</td>
130
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
131
  <tr class="highlight">
132
  <td>9</td>
133
  <td>9999-11-15</td>
 
137
  <td class="highlight">0</td>
138
  <td>7 - 2</td>
139
  </tr>
 
 
 
 
 
 
 
 
 
140
  </table>
141
+ <p>
142
+ In this example, the TableQA system has highlighted specific rows and cells to explain its reasoning:
143
+ </p>
144
+ <ul style="text-align: left;">
145
+ <li>The entire rows for games 2, 4, 5, and 9 are highlighted in yellow.</li>
146
+ <li>Within these rows, the "Opponents" column cells containing "0" are highlighted with a deeper yellow.</li>
147
+ </ul>
148
+ <p>
149
+ These highlights indicate that the system identified four games where the opposing team did not score, verifying the statement as true. By highlighting these cells, the system is showing us the exact data points it used in its decision-making process.
150
+ </p>
151
+ <p>
152
+ During the experiment, you will compare different methods that provide these types of explanations. Your task will be to evaluate which explanations are most clear and helpful in understanding the system's reasoning.
153
+ </p>
154
+ <button onclick="location.href='{{ url_for('index') }}'">Proceed to Experiment</button>
 
 
 
 
155
  </div>
156
  </body>
157
  </html>
templates/introduction.html CHANGED
@@ -38,6 +38,23 @@
38
  height: 600px;
39
  border: none;
40
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
  </style>
42
  </head>
43
  <body>
@@ -186,6 +203,11 @@
186
  <h2>Your Task</h2>
187
  <p>Your task is to evaluate different methods that explain how the TableQA system arrives at its answers. Understanding these explanations helps improve trust and transparency in AI systems.</p>
188
  </div>
 
 
 
 
 
189
  </div>
190
  </body>
191
  </html>
 
38
  height: 600px;
39
  border: none;
40
  }
41
+ .button-container {
42
+ text-align: center;
43
+ margin-top: 20px;
44
+ }
45
+ .next-button {
46
+ background-color: #4CAF50;
47
+ color: white;
48
+ padding: 15px 30px;
49
+ border: none;
50
+ border-radius: 5px;
51
+ cursor: pointer;
52
+ font-size: 18px;
53
+ text-decoration: none;
54
+ }
55
+ .next-button:hover {
56
+ background-color: #45a049;
57
+ }
58
  </style>
59
  </head>
60
  <body>
 
203
  <h2>Your Task</h2>
204
  <p>Your task is to evaluate different methods that explain how the TableQA system arrives at its answers. Understanding these explanations helps improve trust and transparency in AI systems.</p>
205
  </div>
206
+
207
+ <div class="button-container">
208
+ <!-- This button leads to the Attribution Explanations page -->
209
+ <a href="{{ url_for('attribution') }}" class="next-button">Next</a>
210
+ </div>
211
  </div>
212
  </body>
213
  </html>