csuhan commited on
Commit
2e4b1b9
·
1 Parent(s): 995c863
Files changed (2) hide show
  1. app.py +11 -10
  2. packages.txt +1 -0
app.py CHANGED
@@ -140,17 +140,18 @@ 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 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 lfs install")
154
+ os.system("git clone https://huggingface.co/nyanko7/LLaMA-7B")
155
  print("LLaMA-7B downloaded")
156
 
157
  def download_llama_adapter(instruct_adapter_path, caption_adapter_path):
packages.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ git-lfs