admin commited on
Commit
1436450
·
1 Parent(s): 63d3260

decouple musescore appimg

Browse files
Files changed (2) hide show
  1. app.py +3 -0
  2. utils.py +2 -2
app.py CHANGED
@@ -186,6 +186,9 @@ def infer(region: str):
186
  os.makedirs(TEMP_DIR, exist_ok=True)
187
  parser = argparse.ArgumentParser()
188
  args = get_args(parser)
 
 
 
189
  return generate_music(args, region)
190
 
191
 
 
186
  os.makedirs(TEMP_DIR, exist_ok=True)
187
  parser = argparse.ArgumentParser()
188
  args = get_args(parser)
189
+ if region == "Natlan":
190
+ region = "Teyvat"
191
+
192
  return generate_music(args, region)
193
 
194
 
utils.py CHANGED
@@ -7,7 +7,7 @@ import subprocess
7
  from tqdm import tqdm
8
  from modelscope import snapshot_download
9
 
10
- TEYVAT = ["Mondstadt", "Liyue", "Inazuma", "Sumeru", "Fontaine"]
11
  WEIGHTS_PATH = (
12
  snapshot_download("Genius-Society/hoyoMusic", cache_dir="./__pycache__")
13
  + "/weights.pth"
@@ -51,7 +51,7 @@ if sys.platform.startswith("linux"):
51
  extra_dir = "squashfs-root"
52
  download(
53
  filename=apkname,
54
- url="https://www.modelscope.cn/studio/Genius-Society/piano_transcription/resolve/master/MuseScore.AppImage",
55
  )
56
  if not os.path.exists(extra_dir):
57
  subprocess.run(["chmod", "+x", f"./{apkname}"])
 
7
  from tqdm import tqdm
8
  from modelscope import snapshot_download
9
 
10
+ TEYVAT = ["Mondstadt", "Liyue", "Inazuma", "Sumeru", "Fontaine", "Natlan"]
11
  WEIGHTS_PATH = (
12
  snapshot_download("Genius-Society/hoyoMusic", cache_dir="./__pycache__")
13
  + "/weights.pth"
 
51
  extra_dir = "squashfs-root"
52
  download(
53
  filename=apkname,
54
+ url="https://master.dl.sourceforge.net/project/musescore-linux-mirror/MuseScore.AppImage?viasf=1",
55
  )
56
  if not os.path.exists(extra_dir):
57
  subprocess.run(["chmod", "+x", f"./{apkname}"])