Spaces:
Paused
Paused
Update index.js
Browse files
index.js
CHANGED
|
@@ -194,7 +194,8 @@ async function acytoo(text, model) {
|
|
| 194 |
})
|
| 195 |
return res.data
|
| 196 |
}
|
| 197 |
-
|
|
|
|
| 198 |
// data
|
| 199 |
let img = await axios.get(urls, { responseType: "arraybuffer"})
|
| 200 |
let format
|
|
@@ -248,5 +249,6 @@ async function waifu2x(urls, formats) {
|
|
| 248 |
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0"
|
| 249 |
}
|
| 250 |
})
|
| 251 |
-
|
|
|
|
| 252 |
}
|
|
|
|
| 194 |
})
|
| 195 |
return res.data
|
| 196 |
}
|
| 197 |
+
function waifu2x(urls, formats) {
|
| 198 |
+
return new Promise(async (resolve)) => {
|
| 199 |
// data
|
| 200 |
let img = await axios.get(urls, { responseType: "arraybuffer"})
|
| 201 |
let format
|
|
|
|
| 249 |
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0"
|
| 250 |
}
|
| 251 |
})
|
| 252 |
+
resolve(results.data)
|
| 253 |
+
}
|
| 254 |
}
|