Spaces:
Running
Running
Update script.js
Browse files15 unmodified lines1617181920212223242526272829303132331920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636415 unmodified lines
async function query(data) { const response = await fetch( modelLinks[2], // "https://api-inference.huggingface.co/models/glif/90s-anime-art", { headers: { Authorization: `Bearer ${token}`, "Content-Type": "application/json", }, method: "POST", body: JSON.stringify(data), } ); const result = await response.blob(); return result; const response = await fetch(modelLinks[2], { headers: { Authorization: `Bearer ${token}`, "Content-Type": "application/json", }, method: "POST", body: JSON.stringify(data), });
if (!response.ok) { const err = await response.text(); throw new Error(err); }
return await response.blob();}
// async function query(data) {// const response = await fetch( // modelLinks[2],// // "https://api-inference.huggingface.co/models/glif/90s-anime-art",// {// headers: {// Authorization: `Bearer ${token}`,// "Content-Type": "application/json",// },// method: "POST",// body: JSON.stringify(data),// }// );// const result = await response.blob();// return result;// }
btn_clear_el.addEventListener("click", () => { promptText_el.value = "";});script.js+41-15