Jackss
commited on
Commit
·
b743bd2
1
Parent(s):
dda9e37
Stuff
Browse files- static/index.html +21 -11
static/index.html
CHANGED
@@ -6,24 +6,34 @@
|
|
6 |
</head>
|
7 |
<body>
|
8 |
Hello world!
|
|
|
|
|
|
|
9 |
<script>
|
|
|
10 |
|
11 |
papers = [
|
12 |
{'title': 'BERT', 'abstract': 'We introduce a new language representation model called BERT'},
|
13 |
{'title': 'Attention is all you need', 'abstract': ' The dominant sequence transduction models are based on complex recurrent or convolutional neural networks'}
|
14 |
]
|
15 |
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
|
28 |
</script>
|
29 |
</body>
|
|
|
6 |
</head>
|
7 |
<body>
|
8 |
Hello world!
|
9 |
+
<div id="res"></div>
|
10 |
+
|
11 |
+
|
12 |
<script>
|
13 |
+
console.log("started")
|
14 |
|
15 |
papers = [
|
16 |
{'title': 'BERT', 'abstract': 'We introduce a new language representation model called BERT'},
|
17 |
{'title': 'Attention is all you need', 'abstract': ' The dominant sequence transduction models are based on complex recurrent or convolutional neural networks'}
|
18 |
]
|
19 |
|
20 |
+
async function getSimilarity(papers) {
|
21 |
+
await fetch('similarity', {
|
22 |
+
method: 'POST',
|
23 |
+
headers: {
|
24 |
+
'Accept': 'application/json',
|
25 |
+
'Content-Type': 'application/json'
|
26 |
+
},
|
27 |
+
body: JSON.stringify(papers)
|
28 |
+
});
|
29 |
+
|
30 |
+
const content = await rawResponse.json();
|
31 |
+
document.querySelector("#res").innerHTML = content.toString()
|
32 |
+
}
|
33 |
+
|
34 |
+
|
35 |
+
|
36 |
+
getSimilarity(papers)
|
37 |
|
38 |
</script>
|
39 |
</body>
|