Shrirang20 commited on
Commit
b8b18f8
1 Parent(s): 03cacd6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -8
app.py CHANGED
@@ -23,14 +23,19 @@ import subprocess
23
  import sys
24
 
25
  print("CURRENT WORKING DIRECTORY:",os.getcwd())
26
- os.system('wget https://indic-asr-public.objectstore.e2enetworks.net/ai4b_nemo.zip')
27
- os.system('unzip -q ai4b_nemo.zip')
28
- os.chdir('NeMo')
29
- subprocess.run([sys.executable, '-m', 'pip', 'install', '-e', '.'])
30
- os.system('bash reinstall.sh')
31
- os.chdir('..')
32
-
33
- os.execv(sys.executable, ['python'] + sys.argv)
 
 
 
 
 
34
 
35
  # Commented out IPython magic to ensure Python compatibility.
36
  # %%capture
 
23
  import sys
24
 
25
  print("CURRENT WORKING DIRECTORY:",os.getcwd())
26
+ setup_flag = 'setup_complete.flag'
27
+ if not os.path.exists(setup_flag):
28
+ os.system('wget https://indic-asr-public.objectstore.e2enetworks.net/ai4b_nemo.zip')
29
+ os.system('unzip -q ai4b_nemo.zip')
30
+ os.chdir('NeMo')
31
+ subprocess.run([sys.executable, '-m', 'pip', 'install', '-e', '.'])
32
+ os.system('bash reinstall.sh')
33
+ os.chdir('..')
34
+
35
+ with open(setup_flag, 'w') as f:
36
+ f.write('Setup complete')
37
+
38
+ os.execv(sys.executable, ['python'] + sys.argv)
39
 
40
  # Commented out IPython magic to ensure Python compatibility.
41
  # %%capture