Leyo HF staff commited on
Commit
47f3ffb
1 Parent(s): 8a29e64

update_all_readme_script (#15)

Browse files

- add script to update readmes (ddca285ae19c26fefb552b4d7460bfa1abb1a121)

Files changed (1) hide show
  1. update_all_models_readmes.sh +40 -0
update_all_models_readmes.sh ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # get latest version of "idefics-80b" repo
2
+ git pull
3
+
4
+ cd ..
5
+ PATH_TO_REPOS=$(pwd)
6
+ echo ${PATH_TO_REPOS}
7
+ SOURCE_REPO="idefics-80b"
8
+
9
+ if [ ! -d $SOURCE_REPO ]; then
10
+ GIT_LFS_SKIP_SMUDGE=1 git clone "https://huggingface.co/HuggingFaceM4/${SOURCE_REPO}"
11
+ else
12
+ echo "Repository is already cloned."
13
+ fi
14
+ TARGET_REPOS=("idefics-9b" "idefics-9b-instruct" "idefics-80b-instruct")
15
+
16
+ for TARGET_REPO in "${TARGET_REPOS[@]}"; do
17
+ echo $TARGET_REPO
18
+ if [ ! -d $TARGET_REPO ]; then
19
+ GIT_LFS_SKIP_SMUDGE=1 git clone "https://huggingface.co/HuggingFaceM4/${TARGET_REPO}"
20
+ else
21
+ echo "Repository is already cloned."
22
+ fi
23
+
24
+ cd "$TARGET_REPO" || exit
25
+
26
+ # Make sure you have the latest version
27
+ git pull
28
+
29
+ # Remove the existing README
30
+ rm -f README.md
31
+
32
+ # Copy README from SOURCE_REPO
33
+ cp "${PATH_TO_REPOS}/${SOURCE_REPO}/README.md" "${PATH_TO_REPOS}/${TARGET_REPO}"
34
+
35
+ git add README.md
36
+ git commit -m "Update README from ${SOURCE_REPO}"
37
+ git push origin main
38
+
39
+ cd ..
40
+ done