File size: 835 Bytes
83d31f7
d318c59
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
<html>
    <head>
        <title>gpt</title>
    </head>

    <body>
        
        <script>
            async function query(data) {
                const response = await fetch(
                    "https://api-inference.huggingface.co/models/bigcode/octogeex",
                    {
                        headers: { Authorization: "Bearer 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" },
                        method: "POST",
                        body: JSON.stringify(data),
                    }
                );
                const result = await response.json();
                return result;
            }

            query({"inputs": "Can you please let us know more details about your "}).then((response) => {
                console.log(JSON.stringify(response));
            });
        </script>
    </body>
</html>