upscaler-bot / initialSetup.py
PawinC's picture
Upload 13 files
65a646d verified
raw
history blame contribute delete
470 Bytes
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'])