quazim commited on
Commit
b4278db
·
1 Parent(s): 327021c
Files changed (1) hide show
  1. app.py +8 -7
app.py CHANGED
@@ -7,7 +7,14 @@ import os
7
  import tempfile
8
  import soundfile as sf
9
  import time
10
-
 
 
 
 
 
 
 
11
  os.environ['ELASTIC_LOG_LEVEL'] = 'DEBUG'
12
  from transformers import AutoProcessor, pipeline
13
  from elastic_models.transformers import MusicgenForConditionalGeneration
@@ -499,11 +506,5 @@ with gr.Blocks(title="MusicGen Large - Music Generation") as demo:
499
  """)
500
 
501
  if __name__ == "__main__":
502
- try:
503
- subprocess.run(['bash', 'setup.sh.sh'], check=True)
504
- except subprocess.CalledProcessError as e:
505
- print(f"Error: {e}")
506
- except FileNotFoundError:
507
- print("Shell script not found")
508
  cleanup_temp_files()
509
  demo.launch()
 
7
  import tempfile
8
  import soundfile as sf
9
  import time
10
+ import subprocess
11
+
12
+ try:
13
+ subprocess.run(['bash', 'setup.sh.sh'], check=True)
14
+ except subprocess.CalledProcessError as e:
15
+ print(f"Error: {e}")
16
+ except FileNotFoundError:
17
+ print("Shell script not found")
18
  os.environ['ELASTIC_LOG_LEVEL'] = 'DEBUG'
19
  from transformers import AutoProcessor, pipeline
20
  from elastic_models.transformers import MusicgenForConditionalGeneration
 
506
  """)
507
 
508
  if __name__ == "__main__":
 
 
 
 
 
 
509
  cleanup_temp_files()
510
  demo.launch()