AshanGimhana commited on
Commit
c5dda6a
·
verified ·
1 Parent(s): 5a5e81c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -5
app.py CHANGED
@@ -2,12 +2,15 @@ import os
2
 
3
  os.system("pip install gradio==3.50")
4
 
5
- os.system("wget https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-linux.zip")
6
- os.system("sudo unzip ninja-linux.zip -d /usr/local/bin/")
7
- os.system("sudo update-alternatives --install /usr/bin/ninja ninja /usr/local/bin/ninja 1 --force")
8
 
9
- # Clean up
10
- os.system("rm ninja-linux.zip")
 
 
 
11
 
12
 
13
  from argparse import Namespace
 
2
 
3
  os.system("pip install gradio==3.50")
4
 
5
+ if not os.path.exists('ninja-linux.zip'):
6
+ os.system("wget https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-linux.zip")
7
+ os.system("unzip ninja-linux.zip -d ninja") # Unzip it to a local directory
8
 
9
+ # Set Ninja to the PATH
10
+ os.environ['PATH'] = os.getcwd() + '/ninja:' + os.environ['PATH']
11
+
12
+ # Check if Ninja is installed correctly
13
+ os.system('ninja --version')
14
 
15
 
16
  from argparse import Namespace