import os, requests, zipfile, io, subprocess os.makedirs('./real-esrgan/discordbot/input', exist_ok=True) os.makedirs('./real-esrgan/discordbot/output', exist_ok=True) with requests.get('https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.5.0/realesrgan-ncnn-vulkan-20220424-ubuntu.zip') as r: zip_file = zipfile.ZipFile(io.BytesIO(r.content)) zip_file.extractall('./real-esrgan') subprocess.run(['chmod', '+x', './real-esrgan/realesrgan-ncnn-vulkan'])