Spaces:
Runtime error
Runtime error
| <html> | |
| <head> | |
| <title>Trustworthy LLMs for Table QA</title> | |
| <style> | |
| body { | |
| font-family: 'Roboto', sans-serif; | |
| background: url('/static/images/background.jpg') no-repeat center center fixed; | |
| background-size: cover; | |
| display: flex; | |
| justify-content: center; | |
| align-items: center; | |
| height: 100vh; | |
| margin: 0; | |
| } | |
| .container { | |
| text-align: center; | |
| background-color: #ffffff; | |
| padding: 60px; | |
| border-radius: 10px; | |
| box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); | |
| width: 60%; | |
| } | |
| h1 { | |
| color: #000000; | |
| font-size: 48px; | |
| margin-bottom: 30px; | |
| } | |
| .instruction { | |
| font-size: 20px; | |
| color: #333; | |
| margin-bottom: 30px; | |
| padding: 15px; | |
| background-color: #f0f0f0; | |
| border-radius: 5px; | |
| } | |
| label { | |
| display: block; | |
| margin: 20px 0 10px; | |
| color: #000000; | |
| font-size: 24px; | |
| } | |
| input[type="text"], input[type="number"] { | |
| width: 80%; | |
| padding: 15px; | |
| margin-bottom: 20px; | |
| border: 1px solid #ddd; | |
| border-radius: 5px; | |
| font-size: 18px; | |
| } | |
| .method-buttons { | |
| display: flex; | |
| flex-wrap: wrap; | |
| justify-content: space-between; | |
| margin-bottom: 20px; | |
| } | |
| .method-button { | |
| width: 45%; | |
| padding: 15px; | |
| font-size: 20px; | |
| border-radius: 10px; | |
| cursor: pointer; | |
| transition: background-color 0.3s ease, border 0.3s ease; | |
| border: 2px solid; | |
| font-weight: bold; | |
| text-align: center; | |
| margin-bottom: 10px; | |
| } | |
| .method-button.selected { | |
| box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); | |
| } | |
| .method-button[data-method="No-XAI"] { | |
| border-color: gray; | |
| color: gray; | |
| } | |
| .method-button[data-method="Dater"] { | |
| border-color: purple; | |
| color: purple; | |
| } | |
| .method-button[data-method="Chain-of-Table"] { | |
| border-color: blue; | |
| color: blue; | |
| } | |
| .method-button[data-method="Plan-of-SQLs"] { | |
| border-color: green; | |
| color: green; | |
| } | |
| .method-button.selected[data-method="No-XAI"] { | |
| background-color: rgba(128, 128, 128, 0.2); | |
| } | |
| .method-button.selected[data-method="Dater"] { | |
| background-color: rgba(128, 0, 128, 0.2); | |
| } | |
| .method-button.selected[data-method="Chain-of-Table"] { | |
| background-color: rgba(0, 0, 255, 0.2); | |
| } | |
| .method-button.selected[data-method="Plan-of-SQLs"] { | |
| background-color: rgba(0, 128, 0, 0.2); | |
| } | |
| button { | |
| background-color: #4CAF50; | |
| color: white; | |
| padding: 15px 30px; | |
| border: none; | |
| border-radius: 5px; | |
| cursor: pointer; | |
| font-size: 24px; | |
| transition: background-color 0.3s ease; | |
| margin-top: 20px; | |
| } | |
| button:hover { | |
| background-color: #45a049; | |
| } | |
| </style> | |
| <script> | |
| let selectedMethods = []; | |
| function selectMethod(method) { | |
| const index = selectedMethods.indexOf(method); | |
| if (index > -1) { | |
| selectedMethods.splice(index, 1); | |
| } else if (selectedMethods.length < 2) { | |
| selectedMethods.push(method); | |
| } else { | |
| return; | |
| } | |
| document.getElementById('method').value = selectedMethods.join(','); | |
| const buttons = document.getElementsByClassName('method-button'); | |
| for (let button of buttons) { | |
| if (selectedMethods.includes(button.getAttribute('data-method'))) { | |
| button.classList.add('selected'); | |
| } else { | |
| button.classList.remove('selected'); | |
| } | |
| } | |
| } | |
| function validateForm() { | |
| const username = document.getElementById('username').value; | |
| const seed = document.getElementById('seed').value; | |
| if (!username || !seed || selectedMethods.length !== 2) { | |
| alert("Please fill in all fields and select exactly two methods."); | |
| return false; | |
| } | |
| return true; | |
| } | |
| </script> | |
| <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap" rel="stylesheet"> | |
| </head> | |
| <body> | |
| <div class="container"> | |
| <h1>Trustworthy LLMs for Table QA</h1> | |
| <div class="instruction"> | |
| Let's get started! Please input your name, enter a random number as your seed, and select two methods for your experiment. | |
| </div> | |
| <!-- Updated form action --> | |
| <form id="method-form" action="{{ url_for('index') }}" method="post" onsubmit="return validateForm();"> | |
| <label for="username">Hi there πππ ! What is your name?</label> | |
| <input type="text" id="username" name="username" required> | |
| <label for="seed">What is your lucky number? πππ </label> | |
| <input type="number" id="seed" name="seed" required> | |
| <input type="hidden" id="method" name="method" required> | |
| <div class="method-buttons"> | |
| <div class="method-button" onclick="selectMethod('No-XAI')" data-method="No-XAI"> | |
| No-XAI | |
| </div> | |
| <div class="method-button" onclick="selectMethod('Dater')" data-method="Dater"> | |
| Dater | |
| </div> | |
| <div class="method-button" onclick="selectMethod('Chain-of-Table')" data-method="Chain-of-Table"> | |
| Chain-of-Table | |
| </div> | |
| <div class="method-button" onclick="selectMethod('Plan-of-SQLs')" data-method="Plan-of-SQLs"> | |
| Plan-of-SQLs | |
| </div> | |
| </div> | |
| <button type="submit">Start Experiment</button> | |
| </form> | |
| </div> | |
| </body> | |
| </html> | |