yrshi commited on
Commit
0fe2213
·
1 Parent(s): de48493

update some files

Browse files
Files changed (2) hide show
  1. download_model.py +5 -0
  2. install_env.sh +1 -1
download_model.py ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ from transformers import AutoTokenizer, AutoModel
2
+
3
+ model_name = 'intfloat/e5-base-v2'
4
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
5
+ model = AutoModel.from_pretrained(model_name)
install_env.sh CHANGED
@@ -7,4 +7,4 @@ pip install transformers datasets pyserini
7
 
8
  conda install -c pytorch -c nvidia faiss-gpu=1.8.0 -y
9
 
10
- pip install uvicorn fastapi huggingface_hub pydantic
 
7
 
8
  conda install -c pytorch -c nvidia faiss-gpu=1.8.0 -y
9
 
10
+ pip install uvicorn fastapi huggingface_hub pydantic hf_transfer