Skip to content

Commit

Permalink
fix: make sure modelscope README.md is longer than 200 characters
Browse files Browse the repository at this point in the history
fix: update copy-to-modelscope
  • Loading branch information
wsxiaoys committed Sep 27, 2023
1 parent e5340dd commit ff40307
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions experimental/copy-to-modelscope/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ if [ -z "${MODEL_ID}" ]; then
usage
fi

git clone https://huggingface.co/$MODEL_ID hf_model
git clone https://oauth2:${ACCESS_TOKEN}@www.modelscope.cn/$MODEL_ID.git ms_model
git clone https://huggingface.co/$MODEL_ID hf_model

echo "Sync directory"
rsync -a --exclude '.git' hf_model/ ms_model/
rsync -avh --exclude '.git' --delete hf_model/ ms_model/

echo "Create README.md"
cat <<EOF >ms_model/README.md
Expand All @@ -30,6 +30,11 @@ tasks:
# ${MODEL_ID}
This is an mirror of [${MODEL_ID}](https://huggingface.co/${MODEL_ID}).
[Tabby](https://github.com/TabbyML/tabby) is a self-hosted AI coding assistant, offering an open-source and on-premises alternative to GitHub Copilot. It boasts several key features:
* Self-contained, with no need for a DBMS or cloud service.
* OpenAPI interface, easy to integrate with existing infrastructure (e.g Cloud IDE).
* Supports consumer-grade GPUs.
EOF

echo "Create configuration.json"
Expand All @@ -44,10 +49,11 @@ cat <<EOF >ms_model/configuration.json
EOF

set -x
cd ms_model
pushd ms_model
git add .
git commit -m "sync with upstream"
git push origin
popd

echo "Success!"
rm -rf hf_model
Expand Down

0 comments on commit ff40307

Please sign in to comment.