-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
59 lines (51 loc) · 2.32 KB
/
index.html
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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>JSONL Creator</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/FileSaver.js/2.0.5/FileSaver.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
<link rel="stylesheet" href="index.css">
</head>
<body>
<div class="container">
<div class="row section">
<div class="input-field col s12">
<select id="file-selector" class="browser-default">
</select>
<button class="btn waves-effect waves-light" type="button" onclick="setCurrentFile()">Set Current File</button>
</div>
</div>
<div class="row section">
<form id="create-form" class="col s12">
<div class="row">
<div class="input-field col s6">
<input type="text" id="filename" name="filename">
<label for="filename">Filename:</label>
</div>
<button class="btn waves-effect waves-light" type="button" onclick="createFile()">Create File</button>
</div>
</form>
</div>
<form id="add-form" class="section">
<div class="row">
<div class="input-field col s12">
<textarea id="prompt" name="prompt" class="materialize-textarea"></textarea>
<label for="prompt">Prompt:</label>
</div>
<div class="input-field col s12">
<textarea id="completion" name="completion" class="materialize-textarea"></textarea>
<label for="completion">Completion:</label>
</div>
</div>
<button class="btn waves-effect waves-light" type="button" onclick="addLine()">Add Line</button>
</form>
<form id="save-form">
<button class="btn waves-effect waves-light" type="button" onclick="saveFile()">Save File and Add to Collection</button>
</form>
</div>
<script src="script.js"></script>
</body>
</html>