Spaces:
Running
Running
Update lib/toanime.js
Browse files- lib/toanime.js +2 -3
lib/toanime.js
CHANGED
@@ -1,12 +1,11 @@
|
|
1 |
-
import WebSocket from
|
2 |
-
|
3 |
|
4 |
function toAnime({imgBuffer}) {
|
5 |
return new Promise(async(resolve, reject) => {
|
6 |
//const imgBuffer = await axios.get(urls, { responseType: "arraybuffer" });
|
7 |
const imgBase64 = imgBuffer.toString("base64");
|
8 |
const sessHash = Math.random().toString(36).slice(2);
|
9 |
-
const ws = new
|
10 |
headers: {
|
11 |
"Origin": "https://pixnova.ai",
|
12 |
"User-Agent": "Postify/1.0.0",
|
|
|
1 |
+
import WebSocket from 'ws';
|
|
|
2 |
|
3 |
function toAnime({imgBuffer}) {
|
4 |
return new Promise(async(resolve, reject) => {
|
5 |
//const imgBuffer = await axios.get(urls, { responseType: "arraybuffer" });
|
6 |
const imgBase64 = imgBuffer.toString("base64");
|
7 |
const sessHash = Math.random().toString(36).slice(2);
|
8 |
+
const ws = new WebSocket("wss://pixnova.ai/demo-photo2anime/queue/join", {
|
9 |
headers: {
|
10 |
"Origin": "https://pixnova.ai",
|
11 |
"User-Agent": "Postify/1.0.0",
|