kamangir
commited on
Commit
•
63b0414
1
Parent(s):
13ce165
validating single image predict for fashion_mnist - kamangir/bolt#692
Browse files- abcli/fashion_mnist.sh +4 -6
- abcli/image_classifier.sh +4 -2
- image_classifier/__init__.py +1 -1
abcli/fashion_mnist.sh
CHANGED
@@ -35,12 +35,8 @@ function abcli_fashion_mnist() {
|
|
35 |
fi
|
36 |
|
37 |
if [ "$task" == "predict" ] ; then
|
38 |
-
# Args
|
39 |
-
# $2: data_1: data for prediction
|
40 |
-
# $3: name_1: model name
|
41 |
-
# $4: options: data=filename/*object/url,model=object/*saved
|
42 |
-
|
43 |
local data_object=$(abcli_clarify_object "$2" $abcli_object_name)
|
|
|
44 |
if [ "$(abcli_keyword_is $data_object validate)" == true ] ; then
|
45 |
local output_object=$abcli_object_name
|
46 |
|
@@ -51,9 +47,11 @@ function abcli_fashion_mnist() {
|
|
51 |
abcli_select $output_object ~trail
|
52 |
fi
|
53 |
|
|
|
|
|
54 |
abcli_image_classifier predict \
|
55 |
$data_object \
|
56 |
-
$(abcli_clarify_arg "$
|
57 |
${@:4}
|
58 |
|
59 |
abcli_tag set . fashion_mnist
|
|
|
35 |
fi
|
36 |
|
37 |
if [ "$task" == "predict" ] ; then
|
|
|
|
|
|
|
|
|
|
|
38 |
local data_object=$(abcli_clarify_object "$2" $abcli_object_name)
|
39 |
+
|
40 |
if [ "$(abcli_keyword_is $data_object validate)" == true ] ; then
|
41 |
local output_object=$abcli_object_name
|
42 |
|
|
|
47 |
abcli_select $output_object ~trail
|
48 |
fi
|
49 |
|
50 |
+
local model_name=$3
|
51 |
+
|
52 |
abcli_image_classifier predict \
|
53 |
$data_object \
|
54 |
+
$(abcli_clarify_arg "$model_name" fashion-mnist) \
|
55 |
${@:4}
|
56 |
|
57 |
abcli_tag set . fashion_mnist
|
abcli/image_classifier.sh
CHANGED
@@ -67,11 +67,13 @@ function abcli_image_classifier_predict() {
|
|
67 |
|
68 |
local data_object=$(abcli_clarify_object "$1")
|
69 |
|
70 |
-
local
|
71 |
|
72 |
local options=$3
|
73 |
local model_source=$(abcli_option "$options" "model" saved)
|
74 |
|
|
|
|
|
75 |
abcli_download object $data_object
|
76 |
if [ "$model_source" == "object" ] ; then
|
77 |
local model_object=TBD
|
@@ -88,7 +90,7 @@ function abcli_image_classifier_predict() {
|
|
88 |
--objects $abcli_object_root/$data_object \
|
89 |
--output_path $abcli_object_root/$data_object \
|
90 |
--purpose predict \
|
91 |
-
${@:
|
92 |
fi
|
93 |
|
94 |
cp -v $abcli_object_root/$data_object/*.pyndarray .
|
|
|
67 |
|
68 |
local data_object=$(abcli_clarify_object "$1")
|
69 |
|
70 |
+
local model_name=$2
|
71 |
|
72 |
local options=$3
|
73 |
local model_source=$(abcli_option "$options" "model" saved)
|
74 |
|
75 |
+
local model_path=$(abcli_huggingface get_model_path image-classifier "$model_name" "$options")
|
76 |
+
|
77 |
abcli_download object $data_object
|
78 |
if [ "$model_source" == "object" ] ; then
|
79 |
local model_object=TBD
|
|
|
90 |
--objects $abcli_object_root/$data_object \
|
91 |
--output_path $abcli_object_root/$data_object \
|
92 |
--purpose predict \
|
93 |
+
${@:4}
|
94 |
fi
|
95 |
|
96 |
cp -v $abcli_object_root/$data_object/*.pyndarray .
|
image_classifier/__init__.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
name = "image_classifier"
|
2 |
|
3 |
-
version = "1.1.
|
4 |
|
5 |
description = "fashion-mnist + hugging-face + awesome-bash-cli"
|
|
|
1 |
name = "image_classifier"
|
2 |
|
3 |
+
version = "1.1.136"
|
4 |
|
5 |
description = "fashion-mnist + hugging-face + awesome-bash-cli"
|