-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
59 lines (51 loc) · 2.06 KB
/
Copy pathindex.html
File metadata and controls
59 lines (51 loc) · 2.06 KB
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
<head>
<title>Natural SQL</title>
<link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}">
</head>
<body>
<div class="container input-section">
<h1>Natural SQL</h1>
<form method="POST" action="/query">
<label for="user_input">Enter your query in plain English:</label>
<input type="text" placeholder="Ex. Show me the year of the movie where the name is "Shrek""
value="{{user_input}}" id="user_input" name="user_input" required>
<button class="btn btn-primary">Submit</button>
</form>
<div class="help-text">
<strong>💡 Tip:</strong> Use quotes for search values with multiple words<br>
<span class="example">Example: where name is "The Dark Knight"</span>
</div>
<div class="example-queries">
<h3>Try these examples:</h3>
<ul>
<li onclick="fillExample('show me all movies')">• Show me all movies</li>
<li onclick="fillExample('list the names and directors of the movies')">• List the names and directors
of the movies
</li>
<li onclick="fillExample('show me movies where genre is Action')">• Show me movies where genre is
Action</li>
<li onclick="fillExample('give me the year and name of movies')">• Give me the year and name of
movies</li>
</ul>
</div>
</div>
<div id="loading"></div>
<div class="container">
<div class="output-section">
<div class="sql-query-display">
<h3>Generated SQL Query</h3>
<div class="sql-query-box">
{{query}}
</div>
</div>
<div class="sql-results-display">
{{sql_results | safe}}
</div>
</div>
</div>
<script>
function fillExample(query) {
document.getElementById('user_input').value = query;
}
</script>
</body>