Spaces:
Runtime error
Runtime error
File size: 4,078 Bytes
ba07482 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Language Model SQL Query Generator</title>
<style>
body {
background-color: #333;
color: #fff;
font-family: Arial, sans-serif;
text-align: center;
}
form {
margin: 0 auto;
max-width: 600px;
padding: 20px;
background-color: #444;
border-radius: 8px;
}
input[type="text"],
textarea {
width: 100%;
padding: 10px;
margin-bottom: 10px;
box-sizing: border-box;
background-color: #555;
border: none;
border-radius: 4px;
color: #fff;
}
input[type="submit"] {
padding: 10px 20px;
background-color: #007bff;
border: none;
border-radius: 4px;
color: #fff;
cursor: pointer;
}
input[type="submit"]:hover {
background-color: #0056b3;
}
h1,
h2 {
margin-top: 40px;
color: #fff;
}
<style>... table {
margin: 0 auto;
width: 80%;
border-collapse: collapse;
border: 1px solid #ddd;
/* Added border */
border-radius: 10px;
/* Rounded corners */
overflow: hidden;
/* Ensures rounded corners are visible */
}
th,
td {
padding: 8px;
border-bottom: 1px solid #ddd;
color: #fff;
}
th {
background-color: #555;
}
/* Updated styles for query and response cells */
.query {
background-color: #333;
/* Dark grey */
color: #ddd;
/* Light black text */
text-align: left;
}
.response {
background-color: #444;
/* Dark grey */
color: #ddd;
/* Light black text */
}
.history {
margin-top: 40px;
text-align: center;
/* Centered the History heading */
margin-left: auto;
margin-right: auto;
width: 80%;
}
.history table {
margin: 0 auto;
/* Center the table */
text-align: left;
border: 1px solid #ddd;
/* Added border */
border-radius: 10px;
/* Rounded corners */
overflow: hidden;
}
.history strong {
color: #fff;
}
/* Added hover effect to the entire table */
table:hover {
background-color: #666;
}
</style>
</style>
</head>
<body>
<h1>Language Model SQL Query Generator</h1>
<!-- Combined Form -->
<form action="/" method="post">
<!-- DDL Input -->
<label for="ddl">Enter DDL:</label><br>
<textarea id="ddl" name="ddl" rows="5" cols="50">{% if ddl %}{{ ddl }}{% endif %}</textarea><br><br>
<!-- Query Input -->
<label for="user_question">Enter Query:</label><br>
<input type="text" id="user_question" name="user_question"><br><br>
<!-- Submit Button -->
<input type="submit" value="Submit">
</form>
<!-- History -->
<div class="history">
<table>
<caption>
<h2>History</h2>
</caption>
<tbody>
{% for item in history %}
<tr>
<td style="background-color: #333;"><strong>Query:</strong> {{ item.query }}</td>
</tr>
<tr>
<td style="background-color: #666;"><strong>Response:</strong> {{ item.response }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</body>
</html>
|