Spaces:
Running
Running
Update lib/enchance.js
Browse files- lib/enchance.js +2 -2
lib/enchance.js
CHANGED
@@ -52,7 +52,7 @@ async function upscaler(images) {
|
|
52 |
|
53 |
}
|
54 |
|
55 |
-
async function processImageUpscaler({
|
56 |
return new Promise(async (resolve, reject) => {
|
57 |
let Methods = ["enhance"];
|
58 |
Methods.includes(method)? (method = method) : (method = Methods[0]);
|
@@ -63,7 +63,7 @@ async function processImageUpscaler({ urlPath, method, filenames, mimetype }) {
|
|
63 |
|
64 |
formData.append("model_version", 1);
|
65 |
|
66 |
-
formData.append("image",
|
67 |
filename: filenames,
|
68 |
contentType: mimetype,
|
69 |
});
|
|
|
52 |
|
53 |
}
|
54 |
|
55 |
+
async function processImageUpscaler({ buffer, method, filenames, mimetype }) {
|
56 |
return new Promise(async (resolve, reject) => {
|
57 |
let Methods = ["enhance"];
|
58 |
Methods.includes(method)? (method = method) : (method = Methods[0]);
|
|
|
63 |
|
64 |
formData.append("model_version", 1);
|
65 |
|
66 |
+
formData.append("image", buffer, {
|
67 |
filename: filenames,
|
68 |
contentType: mimetype,
|
69 |
});
|