File size: 800 Bytes
2f1c917
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import os
import launch
import platform
import subprocess

def checking():
    try:
        subprocess.run("aria2c", stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
        return True
    except FileNotFoundError:
           return False

if platform.system() == "Linux":
   if not checking():
      launch.run("apt update && apt -y install -qq aria2", "Installing requirements for Model Downloader")
   else:
        pass
elif platform.system() == "Darwin":
     if not checking():
        launch.run("brew install aria2", "Installing requirements for Model Downloader")
     else:
          pass
elif platform.system() == "Windows":
     if not checking():
        print("Model Downloader required aria2c, see tutorial https://www.youtube.com/watch?v=JnWQST4ay_E")
     else:
          pass