-
Notifications
You must be signed in to change notification settings - Fork 0
/
index copy.cfm
268 lines (246 loc) · 14.6 KB
/
index copy.cfm
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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="author" content="Sajjad Hussain" />
<title>ChatGPT Product Data Kit</title>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" />
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css" rel="stylesheet" />
<link rel="shortcut icon" href="./images/chatgpt-favicon.png" type="image/x-icon" />
<link rel="stylesheet" href="css/style.css" />
</head>
<body>
<div id="spinner">
<img src="./images/ajax-loader.gif" />
</div>
<!-- START MAIN CONTAINER -->
<div class="container-fluid">
<section class="data-screen col-12">
<div class="row">
<h5 class="w-100 text-center"> ChatGPT Data Creator Kit in Coldfusion, ES6 & Bootstrap 5 </h5>
<div class="col-lg-8 col-md-8 col-sm-12 content">
<h6 class="p-2 w-100 text-center mt-5">
Enter Product Name in Propmt and Press Generate Button. Thats it!
</h6>
<section class="mb-3 prompt-screen row p-2">
<div class="col-lg-10 col-md-12">
<label for="prompt" class="form-label"> Prompt </label>
<textarea class="form-control" id="prompt" rows="4"
placeholder="Add Product name (e.g iPhone 14 pro max ) and Press Enter "></textarea>
<div id="prompt-help" class="form-text">
Phrase your request in a manner that elicits a precise and
tailored response.
</div>
</div>
<div class="col-lg-2 col-md-12">
<label for="prompt" class="form-label fake-lbl"> </label>
<button class="btn generate-btn col-12 mt-4 form-control" onclick="generateData()">
Generate Data
</button>
</div>
</section>
<section class="mb-3 product-title-holder row">
<div class="col-lg-8 col-md-12">
<label for="title" class="form-label">Title</label>
<div contenteditable="true" type="text" class="form-control" id="title"
aria-describedby="titleHelp"></div>
</div>
<div class="col-lg-4 col-md-12">
<label for="atitle" class="form-label">Additional Input for Title</label>
<textarea type="text" class="form-control" id="atitle"
aria-describedby="atitleHelp"></textarea>
</div>
</section>
<section class="mb-3 product-description-holder row">
<div class="col-lg-8 col-md-12">
<label for="description" class="form-label">Description</label>
<div contenteditable="true" class="form-control div-textarea" id="description"
aria-describedby="descriptionHelp"></div>
</div>
<div class="col-lg-4 col-md-12">
<label for="adescription" class="form-label ">Additional Input for Description</label>
<textarea type="text" class="form-control div-textarea" id="adescription"
aria-describedby="adescriptionHelp"></textarea>
</div>
</section>
<section class="mb-3 product-keywords-holder row">
<div class="col-lg-8 col-md-12">
<label for="keywords" class="form-label">Keywords</label>
<div contenteditable="true" type="text" class="form-control div-textarea"
id="comma-separated-keywords" aria-describedby="keywordsHelp"></div>
</div>
<div class="col-lg-4 col-md-12">
<label for="akeywords" class="form-label">Additional Input for Keywords</label>
<textarea type="text" class="form-control div-textarea" id="acomma-separated-keywords"
aria-describedby="akeywordsHelp"></textarea>
</div>
</section>
<section class="mb-3 product-shortDescription-holder row">
<div class="col-lg-8 col-md-12">
<label for="shortDescription" class="form-label">Short Description</label>
<div contenteditable="true" type="text" class="form-control div-textarea"
id="short-description" aria-describedby="shortDescriptionHelp"></div>
</div>
<div class="col-lg-4 col-md-12">
<label for="ashortDescription" class="form-label">Additional Input for
shortDescription</label>
<textarea type="text" class="form-control div-textarea" id="ashort-description"
aria-describedby="ashortDescriptionHelp"></textarea>
</div>
</section>
<section class="mb-3 product-longDescription-holder row">
<div class="col-lg-8 col-md-12">
<label for="longDescription" class="form-label">Long Description</label>
<div contenteditable="true" type="text" class="form-control div-textarea"
id="long-description" aria-describedby="longDescriptionHelp"></div>
</div>
<div class="col-lg-4 col-md-12">
<label for="alongDescription" class="form-label">Additional Input for Long
Description</label>
<textarea type="text" class="form-control div-textarea" id="along-description"
aria-describedby="alongDescriptionHelp"></textarea>
</div>
</section>
<section class="action-buttons m-2 border row pt-5 mt-2 d-block">
<div class="row d-flex justify-content-around">
<button class="btn generate-btn col-4 btns" onclick="javascript:location.reload();">
Cancel
</button>
<button class="btn generate-btn col-4 btns"
onclick="alert('This button is for saving data to the database.')">
Save
</button>
</div>
</section>
</div>
<div class="col-lg-4 col-md-4 col-sm-12 sidenav">
<!-- START MODELS -->
<section class="row p-2">
<label for="gpt-model" class="form-label">Model</label>
<select name="gpt-model" id="gpt-model" class="form-select text-light gpt-model form-control">
<option value="text-davinci-003" selected>
text-davinci-003
</option>
<option value="text-curie-001">text-curie-001</option>
<option value="text-curie-001">text-babbage-001</option>
<option value="text-curie-001">text-ada-001</option>
</select>
<out class="form-text">Text-Davinci-003 is a highly advanced language model capable of
natural language generation and understanding with human-like
fluency and coherence.
</out>
</section>
<hr />
<!-- START TEMPERATURE -->
<section class="row p-2">
<div class="col-12">
<p class="form-label">Temperature</p>
</div>
<div class="col-10">
<input onchange="changeTemperature()" type="range" class="form-range w-100 sliderControl" min="0" max="1"
step="0.1" id="gpt-temperature" name="gpt-temperature" value="0.7" />
</div>
<div class="col-2 text-end">
<output id="out-temperature">0.7</output>
</div>
<out class="form-text">A higher temperature value will result in more diverse and
creative responses. Conversely, a lower temperature value will
produce more conservative and predictable responses, but may
also be more coherent and on-topic.</out>
</section>
<hr />
<!-- START MAXIMUM LENGTH -->
<section class="row p-2">
<div class="col-12">
<p class="form-label">Maximum Length</p>
</div>
<div class="col-10">
<input onchange="changeMaxLen()" type="range" class="form-range w-100" min="0" max="2048"
step="14" id="gpt-maxLen" name="gpt-max-len" value="2048" />
</div>
<div class="col-2 text-end">
<output id="out-maxLen">2048</output>
</div>
<out class="form-text">
Setting a higher max length may result in more comprehensive and
detailed responses, but may also increase the likelihood of
generating irrelevant or redundant text. Conversely, setting a
lower max length may produce more concise and focused responses,
but may also omit important information or context.</out>
</section>
<hr />
<!-- START TOP P -->
<section class="row p-2">
<div class="col-12">
<p class="form-label">TopP</p>
</div>
<div class="col-10">
<input onchange="changeTopP()" type="range" class="form-range w-100" min="0" max="1"
step="0.01" id="gpt-topP" name="gpt-topP" value="1" />
</div>
<div class="col-2 text-end">
<output id="out-topP">1</output>
</div>
</section>
<out class="form-text">
Increasing the TopP value (e.g., from 0.5 to 0.9) can result in
more diverse and creative responses. Conversely, decreasing the
TopP value (e.g., from 0.9 to 0.5) can lead to more conservative
and predictable responses. This may improve the coherence and
relevance of the generated text</out>
<hr />
<!-- START FREQUENCY PENALTY -->
<section class="row p-2">
<div class="col-12">
<p class="form-label">Frequency Penalty</p>
</div>
<div class="col-10">
<input onchange="changeFrequency()" type="range" class="form-range w-100" min="0" max="2"
step="0.01" id="gpt-frequency" name="gpt-frequency" value="0" />
</div>
<div class="col-2 text-end">
<output id="out-frequency">0</output>
</div>
<out class="form-text">
A frequency penalty decreases word or phrase repetition in a
text.
</out>
</section>
<hr />
<!-- START PRESENCE PENALTY -->
<section class="row p-2">
<div class="col-12">
<p class="form-label">Presence Penalty</p>
</div>
<div class="col-10">
<input onchange="changePresence()" type="range" class="form-range w-100" min="0" max="2"
step="0.01" id="gpt-presence" name="gpt-presence" value="0" />
</div>
<div class="col-2 text-end">
<output id="out-presence">0</output>
</div>
<out class="form-text">Presence penalty decreases the repetition of text in the
generated output of language models like ChatGPT-3. By
penalizing the model's probability distribution for tokens that
have already been generated in the previous context, the model
is encouraged to generate more diverse and novel responses that
avoid repeating the same information.</out>
</section>
</div>
</div>
<div class="w-100 p-1 text-center d-block pt-2">
Copyright @ 2023. Sajjad Hussain
</div>
</section>
</div>
<cfoutput>
<script src="#application.secureurl#/src/lib/chatGPT.js"></script>
</cfoutput>
<!-- START EXTERNAL JS RESOURCES -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/material-ui/5.0.0-beta.5/index.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/material-ui/5.0.0-beta.5/index.js"></script>
</body>
</html>