-
Notifications
You must be signed in to change notification settings - Fork 19
/
index.html
61 lines (59 loc) · 2.86 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
60
61
<!doctype html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>OpenAI GPT2 Text Generator</title>
<meta name="description" content="This site has no affiliation with OpenAI">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.0/css/all.css">
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.2.1/css/bootstrap.min.css" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/mdbootstrap/4.7.3/css/mdb.min.css" rel="stylesheet">
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-119461539-2"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-119461539-2');
</script>
</head>
<body>
<div class="container">
<h2 class="my-5 mx-lg-5">
<strong>OpenAI GPT2 Scratch Pad</strong>
</h2>
<div class="px-lg-5 pt-0">
<form class="md-form" style="color: #757575;">
<textarea name="text" class="form-control md-textarea" rows="10" id="textarea" style="overflow-y: auto"
placeholder="Write here something"></textarea>
<div class="d-flex justify-content-end">
<button class="btn aqua-gradient" type="submit">Generate Text</button>
</div>
</form>
</div>
<hr>
<p>Made with ❤️️ by <a href="https://github.com/NaxAlpha">Nauman Mustafa</a> | Contact: <a href="mailto:[email protected]">[email protected]</a></p>
</div>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.4/umd/popper.min.js"></script>
<script type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.2.1/js/bootstrap.min.js"></script>
<script type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/mdbootstrap/4.7.3/js/mdb.min.js"></script>
<script>
$(document).ready(function() {
var params = new URLSearchParams(window.location.search);
$('textarea').val(params.get('text'))
})
$('form').on('submit', function (e) {
e.preventDefault();
$.post(window.location.href, $(this).serialize(), function (data) {
console.log('Result Found!')
$('textarea').val(data)
});
});
</script>
</body>
</html>