ai_nft_generator's People
Forkers
kiwiers trent122 jasonlantz deltavthrust-nft mradityalad weilps honeykay123 habeebtoyin mr-abbasnejad bmbtran cryptokid2017 ilvino coinkoios neuralnfts logicdex russpalms faiskhan devmane simond110 rydemods smartoneinok eg0pr0xy bunsdev jonbenwaa ckrit-platform cnye36 web3khan anicetfantomas ideasincrypto thehardcoder05 ningchu1998 tonybanks90 willemarswuog mkrein coolpplz useitwise nick-lazzari thefuturefuturist cryptarc travisleerichardson zomtamusic pickleyard justice-orogun ranamom lchau1017 uyiedos simonfuture2 samuelajalode rajeshradhakrishnanmvk fnkk aankirz nafia007 popovicmiroslav mathengem roshi302198242 socloccoc godzillaas yash-5865 henrycaraballoai_nft_generator's Issues
error :400 while on POST request
IDk whats wrong but something i figured problem must be in response probably a new format to make request .
async function generateImage() {
console.log("generating...");
const URL = `https://api-inference.huggingface.co/models/stabilityai/stable-diffusion-2`;
const response = await axios({
url: URL,
method: "POST",
headers: {
Authorization: `Bearer ${process.env.HUGGING_FACE_API_KEY}`,
Accept: "application/json",
"Content-Type": "application/json",
},
data: JSON.stringify({
inputs: description,
options: { wait_for_model: true },
}),
responseType: "arraybuffer",
});
const type = response.headers["content-type"];
const data = response.data;
const base64data = Buffer.from(data).toString("base64");
const img = `data:${type};base64,` + base64data; // <-- This is so we can render it on the page
setImage(img);
return data;
}
Different kind of error has occurred
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.