joey1101 commited on
Commit
a480b15
·
verified ·
1 Parent(s): ac4cbe7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -0
app.py CHANGED
@@ -1,4 +1,23 @@
1
  # -*- coding: utf-8 -*-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  import argparse
3
  import gradio as gr
4
  import os
 
1
  # -*- coding: utf-8 -*-
2
+ from huggingface_hub import snapshot_download
3
+
4
+ # Clip
5
+ snapshot_download(repo_id='openai/clip-vit-base-patch32',
6
+ local_dir="./checkpoints/clip-vit-base-patch32")
7
+
8
+ # LLM
9
+ snapshot_download(repo_id='meta-llama/Llama-2-7b-chat-hf',
10
+ local_dir="./checkpoints/Llama-2-7b-chat-hf", token=hf_token)
11
+
12
+ # Translation
13
+ snapshot_download(repo_id='Helsinki-NLP/opus-mt-en-zh',
14
+ local_dir="./checkpoints/Helsinki-NLP-opus-mt-en-zh")
15
+ snapshot_download(repo_id='Helsinki-NLP/opus-mt-zh-en',
16
+ local_dir="./checkpoints/Helsinki-NLP-opus-mt-zh-en")
17
+
18
+ # Embeddings
19
+ snapshot_download(repo_id='sentence-transformers/all-MiniLM-L12-v2',
20
+ local_dir="./checkpoints/all-MiniLM-L12-v2")
21
  import argparse
22
  import gradio as gr
23
  import os