Spaces:
Paused
Paused
Update index.js
Browse files
index.js
CHANGED
|
@@ -195,12 +195,9 @@ async function acytoo(text, model) {
|
|
| 195 |
})
|
| 196 |
return res.data
|
| 197 |
}
|
| 198 |
-
function waifu2x(urls, formats) {
|
| 199 |
-
return new Promise(async, (resolve)) => {
|
| 200 |
// data
|
| 201 |
-
await axios.get(urls, { responseType: "arraybuffer"})
|
| 202 |
-
.then(img => {
|
| 203 |
-
|
| 204 |
let format
|
| 205 |
if(formats == "Medium") {
|
| 206 |
format = "1"
|
|
@@ -252,7 +249,5 @@ function waifu2x(urls, formats) {
|
|
| 252 |
"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"
|
| 253 |
}
|
| 254 |
})
|
| 255 |
-
|
| 256 |
-
})
|
| 257 |
-
}
|
| 258 |
}
|
|
|
|
| 195 |
})
|
| 196 |
return res.data
|
| 197 |
}
|
| 198 |
+
async function waifu2x(urls, formats) {
|
|
|
|
| 199 |
// data
|
| 200 |
+
let img - await axios.get(urls, { responseType: "arraybuffer"})
|
|
|
|
|
|
|
| 201 |
let format
|
| 202 |
if(formats == "Medium") {
|
| 203 |
format = "1"
|
|
|
|
| 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 |
+
return results.data
|
|
|
|
|
|
|
| 253 |
}
|