mirror of
https://github.com/photoprism/photoprism.git
synced 2026-01-23 02:24:24 +00:00
AI: Added a test for external models
The tests has a envar check to avoid running it by default, as it downloads the models and generates a lot of errors.
This commit is contained in:
parent
ad94d03576
commit
457a47b36f
2 changed files with 391 additions and 0 deletions
|
|
@ -9,6 +9,7 @@ MODEL_ZIP="/tmp/photoprism/nasnet.zip"
|
|||
MODEL_HASH="f18b801354e95cade497b4f12e8d2537d04c04f6 $MODEL_ZIP"
|
||||
MODEL_VERSION="$MODEL_PATH/version.txt"
|
||||
MODEL_BACKUP="storage/backup/nasnet-$TODAY"
|
||||
MODEL_21K_LABELS_URL="https://dl.photoprism.app/tensorflow/vision/labels-imagenet21k.txt"
|
||||
|
||||
echo "Installing $MODEL_NAME model for TensorFlow..."
|
||||
|
||||
|
|
@ -42,5 +43,6 @@ fi
|
|||
# Unzip model
|
||||
unzip ${MODEL_ZIP} -d assets
|
||||
echo "$MODEL_NAME $TODAY $MODEL_HASH" > ${MODEL_VERSION}
|
||||
wget --inet4-only -c "${MODEL_21K_LABELS_URL}" -O ${MODEL_PATH}/labels21k.txt
|
||||
|
||||
echo "Latest $MODEL_NAME installed."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue