Spaces:
Runtime error
Runtime error
| <html> | |
| <head> | |
| <title>Experiment</title> | |
| <style> | |
| body, html { | |
| font-family: 'Roboto', sans-serif; | |
| margin: 0; | |
| padding: 0; | |
| height: 100%; | |
| overflow: hidden; | |
| } | |
| .container { | |
| display: flex; | |
| flex-direction: column; | |
| height: 100vh; | |
| padding: 10px; | |
| box-sizing: border-box; | |
| } | |
| .header { | |
| flex: 0 0 auto; | |
| } | |
| 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; | |
| overflow: hidden; | |
| } | |
| .visualization { | |
| width: 49%; | |
| height: 100%; | |
| border: 1px solid #ddd; | |
| border-radius: 5px; | |
| overflow: hidden; | |
| display: flex; | |
| flex-direction: column; | |
| } | |
| .visualization h2 { | |
| margin: 0; | |
| padding: 10px; | |
| background-color: #f0f0f0; | |
| } | |
| iframe { | |
| flex: 1; | |
| width: 100%; | |
| border: none; | |
| } | |
| .footer { | |
| flex: 0 0 auto; | |
| margin-top: 10px; | |
| } | |
| .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; | |
| 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; } | |
| .loader, .overlay { | |
| /* ... (keep these styles as they were) ... */ | |
| } | |
| </style> | |
| <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap" rel="stylesheet"> | |
| </head> | |
| <body> | |
| <div class="container"> | |
| <div class="header"> | |
| <h1>{{ sample_id + 1 }} / 10</h1> | |
| <p><strong>Task description:</strong> {{ statement }}</p> | |
| </div> | |
| <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="footer"> | |
| <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> | |
| <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> |