jbilcke-hf's picture
jbilcke-hf HF staff
starting to work on the ui
e5c2fd4
raw
history blame
568 Bytes
const { promises: fs } = require("node:fs")
const main = async () => {
console.log('generating shot..')
const response = await fetch(process.env."http://localhost:3000/api/shot", {
method: "POST",
headers: {
"Accept": "application/json",
"Content-Type": "application/json"
},
body: JSON.stringify({
token: process.env.VC_SECRET_ACCESS_TOKEN,
shotPrompt: "video of a dancing cat"
})
});
console.log('response:', response)
const buffer = await response.buffer()
fs.writeFile(`./test-juju.mp4`, buffer)
}
main()