Spaces:
Runtime error
Runtime error
Commit
·
db380b4
1
Parent(s):
3861914
update
Browse files- templates/experiment.html +27 -22
templates/experiment.html
CHANGED
|
@@ -12,15 +12,15 @@
|
|
| 12 |
display: flex;
|
| 13 |
justify-content: center;
|
| 14 |
align-items: center;
|
| 15 |
-
height: 100vh;
|
| 16 |
}
|
| 17 |
.container {
|
| 18 |
background-color: #ffffff;
|
| 19 |
padding: 20px;
|
| 20 |
border-radius: 10px;
|
| 21 |
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
| 22 |
-
width:
|
| 23 |
-
height:
|
| 24 |
margin: 0;
|
| 25 |
text-align: center;
|
| 26 |
display: flex;
|
|
@@ -28,33 +28,35 @@
|
|
| 28 |
}
|
| 29 |
h1, h2 {
|
| 30 |
color: #000000;
|
| 31 |
-
font-size:
|
|
|
|
| 32 |
}
|
| 33 |
p {
|
| 34 |
color: #000000;
|
| 35 |
-
font-size:
|
|
|
|
| 36 |
}
|
| 37 |
.visualization-container {
|
| 38 |
display: flex;
|
| 39 |
justify-content: space-between;
|
| 40 |
flex: 1;
|
| 41 |
-
margin:
|
| 42 |
}
|
| 43 |
.visualization {
|
| 44 |
-
width:
|
| 45 |
-
height: calc(100vh -
|
| 46 |
border: 1px solid #ddd;
|
| 47 |
border-radius: 5px;
|
| 48 |
overflow: hidden;
|
| 49 |
}
|
| 50 |
.question-box {
|
| 51 |
background-color: #f0f0f0;
|
| 52 |
-
padding:
|
| 53 |
border-radius: 10px;
|
| 54 |
-
margin:
|
| 55 |
}
|
| 56 |
.question-text {
|
| 57 |
-
font-size:
|
| 58 |
font-weight: bold;
|
| 59 |
color: #333;
|
| 60 |
}
|
|
@@ -64,12 +66,12 @@
|
|
| 64 |
}
|
| 65 |
button {
|
| 66 |
color: white;
|
| 67 |
-
padding:
|
| 68 |
border: none;
|
| 69 |
border-radius: 5px;
|
| 70 |
cursor: pointer;
|
| 71 |
-
font-size:
|
| 72 |
-
margin-top:
|
| 73 |
width: 48%;
|
| 74 |
transition: background-color 0.3s ease;
|
| 75 |
}
|
|
@@ -88,6 +90,11 @@
|
|
| 88 |
button[value="Plan-of-SQLs"] {
|
| 89 |
background-color: green;
|
| 90 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 91 |
</style>
|
| 92 |
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap" rel="stylesheet">
|
| 93 |
</head>
|
|
@@ -96,27 +103,25 @@
|
|
| 96 |
<h1>{{ sample_id + 1 }} / 10</h1>
|
| 97 |
<p><strong>Task description:</strong> {{ statement }}</p>
|
| 98 |
<div class="visualization-container">
|
| 99 |
-
{% set methods = ['No-XAI', 'Dater', 'Chain-of-Table', 'Plan-of-SQLs'] %}
|
| 100 |
-
{% set method_a, method_b = random.sample(methods, 2) %}
|
| 101 |
<div class="visualization">
|
| 102 |
<h2>{{ method_a }}</h2>
|
| 103 |
-
<iframe src="{{
|
| 104 |
</div>
|
| 105 |
<div class="visualization">
|
| 106 |
<h2>{{ method_b }}</h2>
|
| 107 |
-
<iframe src="{{
|
| 108 |
</div>
|
| 109 |
</div>
|
| 110 |
<div class="question-box">
|
| 111 |
<p class="question-text">Which explanation provides a clearer and more accurate reasoning process?</p>
|
| 112 |
</div>
|
| 113 |
<div class="buttons">
|
| 114 |
-
<form action="{{ url_for('
|
| 115 |
-
<input type="hidden" name="
|
| 116 |
<button type="submit" name="feedback" value="{{ method_a }}">{{ method_a }}</button>
|
| 117 |
</form>
|
| 118 |
-
<form action="{{ url_for('
|
| 119 |
-
<input type="hidden" name="
|
| 120 |
<button type="submit" name="feedback" value="{{ method_b }}">{{ method_b }}</button>
|
| 121 |
</form>
|
| 122 |
</div>
|
|
|
|
| 12 |
display: flex;
|
| 13 |
justify-content: center;
|
| 14 |
align-items: center;
|
| 15 |
+
min-height: 100vh;
|
| 16 |
}
|
| 17 |
.container {
|
| 18 |
background-color: #ffffff;
|
| 19 |
padding: 20px;
|
| 20 |
border-radius: 10px;
|
| 21 |
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
| 22 |
+
width: 98%;
|
| 23 |
+
height: 98vh;
|
| 24 |
margin: 0;
|
| 25 |
text-align: center;
|
| 26 |
display: flex;
|
|
|
|
| 28 |
}
|
| 29 |
h1, h2 {
|
| 30 |
color: #000000;
|
| 31 |
+
font-size: 20px;
|
| 32 |
+
margin: 10px 0;
|
| 33 |
}
|
| 34 |
p {
|
| 35 |
color: #000000;
|
| 36 |
+
font-size: 16px;
|
| 37 |
+
margin: 5px 0;
|
| 38 |
}
|
| 39 |
.visualization-container {
|
| 40 |
display: flex;
|
| 41 |
justify-content: space-between;
|
| 42 |
flex: 1;
|
| 43 |
+
margin: 10px 0;
|
| 44 |
}
|
| 45 |
.visualization {
|
| 46 |
+
width: 49%;
|
| 47 |
+
height: calc(100vh - 250px);
|
| 48 |
border: 1px solid #ddd;
|
| 49 |
border-radius: 5px;
|
| 50 |
overflow: hidden;
|
| 51 |
}
|
| 52 |
.question-box {
|
| 53 |
background-color: #f0f0f0;
|
| 54 |
+
padding: 10px;
|
| 55 |
border-radius: 10px;
|
| 56 |
+
margin: 10px 0;
|
| 57 |
}
|
| 58 |
.question-text {
|
| 59 |
+
font-size: 18px;
|
| 60 |
font-weight: bold;
|
| 61 |
color: #333;
|
| 62 |
}
|
|
|
|
| 66 |
}
|
| 67 |
button {
|
| 68 |
color: white;
|
| 69 |
+
padding: 10px 20px;
|
| 70 |
border: none;
|
| 71 |
border-radius: 5px;
|
| 72 |
cursor: pointer;
|
| 73 |
+
font-size: 16px;
|
| 74 |
+
margin-top: 10px;
|
| 75 |
width: 48%;
|
| 76 |
transition: background-color 0.3s ease;
|
| 77 |
}
|
|
|
|
| 90 |
button[value="Plan-of-SQLs"] {
|
| 91 |
background-color: green;
|
| 92 |
}
|
| 93 |
+
iframe {
|
| 94 |
+
width: 100%;
|
| 95 |
+
height: 100%;
|
| 96 |
+
border: none;
|
| 97 |
+
}
|
| 98 |
</style>
|
| 99 |
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap" rel="stylesheet">
|
| 100 |
</head>
|
|
|
|
| 103 |
<h1>{{ sample_id + 1 }} / 10</h1>
|
| 104 |
<p><strong>Task description:</strong> {{ statement }}</p>
|
| 105 |
<div class="visualization-container">
|
|
|
|
|
|
|
| 106 |
<div class="visualization">
|
| 107 |
<h2>{{ method_a }}</h2>
|
| 108 |
+
<iframe src="{{ visualization_a }}" frameborder="0"></iframe>
|
| 109 |
</div>
|
| 110 |
<div class="visualization">
|
| 111 |
<h2>{{ method_b }}</h2>
|
| 112 |
+
<iframe src="{{ visualization_b }}" frameborder="0"></iframe>
|
| 113 |
</div>
|
| 114 |
</div>
|
| 115 |
<div class="question-box">
|
| 116 |
<p class="question-text">Which explanation provides a clearer and more accurate reasoning process?</p>
|
| 117 |
</div>
|
| 118 |
<div class="buttons">
|
| 119 |
+
<form action="{{ url_for('feedback') }}" method="post" style="width: 48%;">
|
| 120 |
+
<input type="hidden" name="username" value="{{ username }}">
|
| 121 |
<button type="submit" name="feedback" value="{{ method_a }}">{{ method_a }}</button>
|
| 122 |
</form>
|
| 123 |
+
<form action="{{ url_for('feedback') }}" method="post" style="width: 48%;">
|
| 124 |
+
<input type="hidden" name="username" value="{{ username }}">
|
| 125 |
<button type="submit" name="feedback" value="{{ method_b }}">{{ method_b }}</button>
|
| 126 |
</form>
|
| 127 |
</div>
|