hugo flores garcia commited on
Commit
4ec7317
1 Parent(s): 9c153c6
Files changed (2) hide show
  1. app.py +1 -1
  2. vampnet/__init__.py +3 -16
app.py CHANGED
@@ -18,7 +18,7 @@ from vampnet import mask as pmask
18
  device = "cuda" if torch.cuda.is_available() else "cpu"
19
 
20
  interface = Interface.default()
21
- init_model_choice = open("DEFAULT_MODEL.txt").read().strip()
22
  # load the init model
23
  interface.load_finetuned(init_model_choice)
24
 
 
18
  device = "cuda" if torch.cuda.is_available() else "cpu"
19
 
20
  interface = Interface.default()
21
+ init_model_choice = open("DEFAULT_MODEL").read().strip()
22
  # load the init model
23
  interface.load_finetuned(init_model_choice)
24
 
vampnet/__init__.py CHANGED
@@ -36,14 +36,8 @@ def download_default():
36
  for filename in filenames:
37
  path = f"{MODELS_DIR}/{filename}"
38
  if not Path(path).exists():
39
- path = hf_hub_download(
40
- repo_id=repo_id,
41
- filename=filename,
42
- subfolder=None,
43
- local_dir=MODELS_DIR,
44
- local_dir_use_symlinks=False,
45
- local_files_only=False
46
- )
47
  paths.append(path)
48
 
49
  # load the models
@@ -58,14 +52,7 @@ def download_finetuned(name):
58
  path = f"{MODELS_DIR}/loras/{name}/{filename}"
59
  if not Path(path).exists():
60
  print(f"{path} does not exist, downloading")
61
- path = hf_hub_download(
62
- repo_id=repo_id,
63
- filename=filename,
64
- subfolder=f"loras/{name}",
65
- local_dir=MODELS_DIR,
66
- local_dir_use_symlinks=False,
67
- local_files_only=False
68
- )
69
  paths.append(path)
70
 
71
  # load the models
 
36
  for filename in filenames:
37
  path = f"{MODELS_DIR}/{filename}"
38
  if not Path(path).exists():
39
+ print(f"{path} does not exist, downloading")
40
+ FS.download(f"{repo_id}/{filename}", path)
 
 
 
 
 
 
41
  paths.append(path)
42
 
43
  # load the models
 
52
  path = f"{MODELS_DIR}/loras/{name}/{filename}"
53
  if not Path(path).exists():
54
  print(f"{path} does not exist, downloading")
55
+ FS.download(f"{repo_id}/loras/{name}/{filename}", path)
 
 
 
 
 
 
 
56
  paths.append(path)
57
 
58
  # load the models