Spaces:
Running
Running
Commit
·
d318c59
1
Parent(s):
83d31f7
Update index.html
Browse files- index.html +26 -18
index.html
CHANGED
|
@@ -1,19 +1,27 @@
|
|
| 1 |
-
<!DOCTYPE html>
|
| 2 |
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
<html>
|
| 2 |
+
<head>
|
| 3 |
+
<title>gpt</title>
|
| 4 |
+
</head>
|
| 5 |
+
|
| 6 |
+
<body>
|
| 7 |
+
|
| 8 |
+
<script>
|
| 9 |
+
async function query(data) {
|
| 10 |
+
const response = await fetch(
|
| 11 |
+
"https://api-inference.huggingface.co/models/bigcode/octogeex",
|
| 12 |
+
{
|
| 13 |
+
headers: { Authorization: "Bearer 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" },
|
| 14 |
+
method: "POST",
|
| 15 |
+
body: JSON.stringify(data),
|
| 16 |
+
}
|
| 17 |
+
);
|
| 18 |
+
const result = await response.json();
|
| 19 |
+
return result;
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
query({"inputs": "Can you please let us know more details about your "}).then((response) => {
|
| 23 |
+
console.log(JSON.stringify(response));
|
| 24 |
+
});
|
| 25 |
+
</script>
|
| 26 |
+
</body>
|
| 27 |
+
</html>
|