proposal-classifier 0.4.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +1 -1
- data/lib/proposal/classifier/version.rb +2 -2
- data/lib/proposal/classifier.rb +20 -16
- data/proposal-classifier.gemspec +2 -4
- metadata +5 -34
- data/lib/proposal/exported_model.onnx +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cf1309a56ecc06c6fa3dd7cf68bee6c90ad53dfec0a3bd03a270d176ca3027b5
|
4
|
+
data.tar.gz: 2a40dec4fa0a1ee792ce469da4ebd903cf49fc4ff204f0eb4844785221df3f4c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9bf6b46455af21d87d03267b5deff7428fde93cffe6c3aabffa4c639f1ce372c63ac6ca40cd9b5b7057bfaa9d396608483de62e714eff6a9721a9898496de22
|
7
|
+
data.tar.gz: be3391454f71cfe9bb2e83126de3de845358c834bbeab819ab1bf5ee36126b750da0386319038a79c23824d61e6b3ee2c466c5c72ac13f50a86d44ee1226a4ed
|
data/Rakefile
CHANGED
data/lib/proposal/classifier.rb
CHANGED
@@ -1,24 +1,28 @@
|
|
1
|
-
# frozen_string_literal:
|
2
|
-
require 'onnxruntime'
|
3
|
-
require 'ruby-spacy'
|
4
|
-
require 'pycall/import'
|
5
|
-
include PyCall::Import
|
1
|
+
# frozen_string_literal: false
|
6
2
|
|
7
|
-
|
3
|
+
require "http"
|
8
4
|
|
9
5
|
module Proposal
|
10
6
|
module Classifier
|
11
7
|
class Model
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
8
|
+
@base_url = "http://0.0.0.0" # Default base URL
|
9
|
+
|
10
|
+
def self.base_url
|
11
|
+
@base_url.dup
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.base_url=(new_url)
|
15
|
+
@base_url = new_url.dup
|
16
|
+
end
|
17
|
+
|
18
|
+
def self.init()
|
19
|
+
response_get = HTTP.get(@base_url.dup).body.to_s.dup
|
20
|
+
return response_get.dup
|
21
|
+
end
|
22
|
+
|
23
|
+
def self.predict(input_text)
|
24
|
+
response_post = HTTP.post(@base_url.dup + "/predict", :json => { :text => input_text }).body.to_s.dup
|
25
|
+
return response_post.dup
|
22
26
|
end
|
23
27
|
end
|
24
28
|
end
|
data/proposal-classifier.gemspec
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# frozen_string_literal:
|
1
|
+
# frozen_string_literal: false
|
2
2
|
|
3
3
|
require_relative "lib/proposal/classifier/version"
|
4
4
|
|
@@ -31,9 +31,7 @@ Gem::Specification.new do |spec|
|
|
31
31
|
spec.require_paths = ["lib"]
|
32
32
|
|
33
33
|
# Uncomment to register a new dependency of your gem
|
34
|
-
spec.add_dependency "
|
35
|
-
spec.add_dependency "ruby-spacy", "~> 0.1.5.4"
|
36
|
-
spec.add_dependency "pycall", "~> 1.4.2"
|
34
|
+
spec.add_dependency "http", "~> 3.0"
|
37
35
|
|
38
36
|
# For more information and examples about making a new gem, check out our
|
39
37
|
# guide at: https://bundler.io/guides/creating_gem.html
|
metadata
CHANGED
@@ -1,57 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: proposal-classifier
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- chaydson
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-11-
|
11
|
+
date: 2023-11-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: http
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0
|
19
|
+
version: '3.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: ruby-spacy
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: 0.1.5.4
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: 0.1.5.4
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: pycall
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - "~>"
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: 1.4.2
|
48
|
-
type: :runtime
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - "~>"
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: 1.4.2
|
26
|
+
version: '3.0'
|
55
27
|
description: Write a longer description or delete this line.
|
56
28
|
email:
|
57
29
|
- chaydson14@gmail.com
|
@@ -68,7 +40,6 @@ files:
|
|
68
40
|
- Rakefile
|
69
41
|
- lib/proposal/classifier.rb
|
70
42
|
- lib/proposal/classifier/version.rb
|
71
|
-
- lib/proposal/exported_model.onnx
|
72
43
|
- proposal-classifier.gemspec
|
73
44
|
- sig/proposal/classifier.rbs
|
74
45
|
homepage: https://github.com/chaydson/proposal-classifier
|
Binary file
|