Spaces:
Sleeping
Sleeping
Commit ·
929d64b
1
Parent(s): f0c8e2c
fix: add download_model script
Browse files- download_model.sh +19 -0
download_model.sh
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
|
| 3 |
+
# defines the qa model
|
| 4 |
+
MODEL_DIR="https://huggingface.co/sentence-transformers/paraphrase-MiniLM-L6-v2/resolve/main"
|
| 5 |
+
MODEL_NAME="paraphrase-MiniLM-L6-v2"
|
| 6 |
+
|
| 7 |
+
# downloads the qa model. To make this image more general one can use wget
|
| 8 |
+
# with the "-i requires.txt" argument to download the necessary files defined
|
| 9 |
+
# in "requires.txt".
|
| 10 |
+
mkdir ${MODEL_NAME} &&\
|
| 11 |
+
wget --directory-prefix=${MODEL_NAME} ${MODEL_DIR}/vocab.txt &&\
|
| 12 |
+
wget --directory-prefix=${MODEL_NAME} ${MODEL_DIR}/tokenizer_config.json &&\
|
| 13 |
+
wget --directory-prefix=${MODEL_NAME} ${MODEL_DIR}/tokenizer.json &&\
|
| 14 |
+
wget --directory-prefix=${MODEL_NAME} ${MODEL_DIR}/special_tokens_map.json &&\
|
| 15 |
+
wget --directory-prefix=${MODEL_NAME} ${MODEL_DIR}/sentence_bert_config.json &&\
|
| 16 |
+
wget --directory-prefix=${MODEL_NAME} ${MODEL_DIR}/pytorch_model.bin &&\
|
| 17 |
+
wget --directory-prefix=${MODEL_NAME} ${MODEL_DIR}/modules.json &&\
|
| 18 |
+
wget --directory-prefix=${MODEL_NAME} ${MODEL_DIR}/config_sentence_transformers.json &&\
|
| 19 |
+
wget --directory-prefix=${MODEL_NAME} ${MODEL_DIR}/config.json
|