csuhan commited on
Commit
995c863
·
1 Parent(s): a73dde5
Files changed (1) hide show
  1. app.py +10 -10
app.py CHANGED
@@ -140,17 +140,17 @@ def download_llama_7b(ckpt_dir, tokenizer_path):
140
  os.makedirs(ckpt_dir, exist_ok=True)
141
  ckpt_path = os.path.join(ckpt_dir, "consolidated.00.pth")
142
  param_path = os.path.join(ckpt_dir, "params.json")
143
- # if not os.path.exists(ckpt_path):
144
- # os.system(
145
- # f"wget -O {ckpt_path} https://huggingface.co/nyanko7/LLaMA-7B/resolve/main/consolidated.00.pth")
146
- # if not os.path.exists(param_path):
147
- # os.system(
148
- # f"wget -O {param_path} https://huggingface.co/nyanko7/LLaMA-7B/raw/main/params.json")
149
- # if not os.path.exists(tokenizer_path):
150
- # os.system(
151
- # f"wget -O {tokenizer_path} https://huggingface.co/nyanko7/LLaMA-7B/resolve/main/tokenizer.model")
152
  if not os.path.exists(ckpt_path):
153
- os.system("git lfs clone https://huggingface.co/nyanko7/LLaMA-7B")
 
 
 
 
 
 
 
 
 
154
  print("LLaMA-7B downloaded")
155
 
156
  def download_llama_adapter(instruct_adapter_path, caption_adapter_path):
 
140
  os.makedirs(ckpt_dir, exist_ok=True)
141
  ckpt_path = os.path.join(ckpt_dir, "consolidated.00.pth")
142
  param_path = os.path.join(ckpt_dir, "params.json")
 
 
 
 
 
 
 
 
 
143
  if not os.path.exists(ckpt_path):
144
+ os.system(
145
+ f"wget -O {ckpt_path} https://huggingface.co/nyanko7/LLaMA-7B/resolve/main/consolidated.00.pth")
146
+ if not os.path.exists(param_path):
147
+ os.system(
148
+ f"wget -O {param_path} https://huggingface.co/nyanko7/LLaMA-7B/raw/main/params.json")
149
+ if not os.path.exists(tokenizer_path):
150
+ os.system(
151
+ f"wget -O {tokenizer_path} https://huggingface.co/nyanko7/LLaMA-7B/resolve/main/tokenizer.model")
152
+ # if not os.path.exists(ckpt_path):
153
+ # os.system("git clone https://huggingface.co/nyanko7/LLaMA-7B")
154
  print("LLaMA-7B downloaded")
155
 
156
  def download_llama_adapter(instruct_adapter_path, caption_adapter_path):