MuGeminorum commited on
Commit
19b4090
1 Parent(s): 27cf0c7

refine codes

Browse files
Files changed (2) hide show
  1. app.py +1 -1
  2. utils.py +0 -5
app.py CHANGED
@@ -181,7 +181,7 @@ def generate_abc(args, region):
181
  print("\n")
182
 
183
  print("Generation time: {:.2f} seconds".format(time.time() - start_time))
184
- create_dir("./tmp")
185
  timestamp = time.strftime("%a_%d_%b_%Y_%H_%M_%S", time.localtime())
186
  out_midi = abc_to_midi(tunes, f"./tmp/[{region}]{timestamp}.mid")
187
  out_xml = abc_to_musicxml(tunes, f"./tmp/[{region}]{timestamp}.musicxml")
 
181
  print("\n")
182
 
183
  print("Generation time: {:.2f} seconds".format(time.time() - start_time))
184
+ os.makedirs("./tmp", exist_ok=True)
185
  timestamp = time.strftime("%a_%d_%b_%Y_%H_%M_%S", time.localtime())
186
  out_midi = abc_to_midi(tunes, f"./tmp/[{region}]{timestamp}.mid")
187
  out_xml = abc_to_musicxml(tunes, f"./tmp/[{region}]{timestamp}.musicxml")
utils.py CHANGED
@@ -27,11 +27,6 @@ K:D
27
  de |"D"'''
28
 
29
 
30
- def create_dir(dir_path):
31
- if not os.path.exists(dir_path):
32
- os.makedirs(dir_path)
33
-
34
-
35
  def download(filename=WEIGHT_PATH, url=WEIGHT_URL):
36
  import time
37
  import requests
 
27
  de |"D"'''
28
 
29
 
 
 
 
 
 
30
  def download(filename=WEIGHT_PATH, url=WEIGHT_URL):
31
  import time
32
  import requests