proposal-classifier 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/proposal/classifier/version.rb +1 -1
- data/lib/proposal/classifier.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 825ce2cda03f9c46f92acff84ca7fdb7e24e14f57996ed3737843b8e01723330
|
4
|
+
data.tar.gz: 817a1dd9f68cb1ebefe1ef2d68b5b3f1bf38ff72cc5bcf9624ea71a418d2801f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 139278c11a9642fe1499cbac5a9de1bf1bd219321def8216fd07954d681a808ee71c92cbbd2e0b07948dd0d34976f05bc9a6a9f51cda691621acaa33e98198fd
|
7
|
+
data.tar.gz: 64d508d35f6b69e1b29a6d56e77f19db257b973a04f3b6d38e7f7c8c8b2072961b5c83660eda2fbc78656b291a41acb7bc3b2d61a2e95f815dead4ce4061bb44
|
data/lib/proposal/classifier.rb
CHANGED
@@ -14,7 +14,7 @@ module Proposal
|
|
14
14
|
doc = nlp.read(input_text)
|
15
15
|
vector = doc.vector
|
16
16
|
scaled_array = (vector - vector.min) / (vector.max - vector.min) * (1 - 0) + 0
|
17
|
-
model = OnnxRuntime::InferenceSession.new("
|
17
|
+
model = OnnxRuntime::InferenceSession.new("./exported_model.onnx")
|
18
18
|
label_name = model.outputs()[0][:name]
|
19
19
|
vector_fim_reshaped = scaled_array.reshape(1, -1)
|
20
20
|
pred_onx = model.run([label_name], {X: vector_fim_reshaped})[0]
|