Last active
June 22, 2020 01:13
-
-
Save craftoid/eed46de8f342cfbb6a28fbaa1509045a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let FormData = require('form-data'); | |
let fs = require('fs'); | |
let form = new FormData(); | |
form.append('image', fs.createReadStream('/tmp/image.jpg')); | |
form.submit('http://max-image-resolution-enhancer.codait-prod-41208c73af8fca213512856c7a09db52-0000.us-east.containers.appdomain.cloud/model/predict', function(err, res) { | |
if (err) throw err; | |
res.pipe(fs.createWriteStream('/tmp/scaled.png')); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment