File size: 470 Bytes
65a646d
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
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'])