nlpcloud 1.0.12 → 1.0.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/nlpcloud.rb +10 -3
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0d15c8d10001f6858a03294421913df01689dc776786f22292ec4f02f0d73a83
4
- data.tar.gz: 3b1bfc5e7dd10844cb6f714e4d6749579c81528fd5599cf76b52129677f2d510
3
+ metadata.gz: 5530e1eddfaa48e0547b69a03e6cdb60227db948d0a105a828ec3510f0413a80
4
+ data.tar.gz: 9b43269b64b3837523a63e3864100ff310008390ad0206af9217f33f7de43dd4
5
5
  SHA512:
6
- metadata.gz: 701204c9a11f8000d618ffd9bab25f922e2607d48790931669843371927601336aa0d06ed9a8e4f911d7bc00a0c4f2e829b23d57c230530d941157f5c61367cb
7
- data.tar.gz: cc2d2bab211b74a071aab5f9262360b81517d0f82bad2b8081981ffeb6f35ac3e3f1fb2e3546d57c9b7fa2623bf4b137069bd4cb27a9fa6ef2592a3ada1da294
6
+ metadata.gz: d174e5a6af642c508f59f273e02e38765de36afcb8792c8312f47f2295f5773d63540d641895bdd4364ca01158e0374e5610786909ab9c1a20fe2c41aaecf60d
7
+ data.tar.gz: f412ad06bdfadad1b1e0bcf8408e20c51ccfa99753756411ab1d235c2ad9a11702f1e32287a5a46c333ff55ef63fe609ed011747d27e10b6de01ceecc3f533b4
data/lib/nlpcloud.rb CHANGED
@@ -41,8 +41,9 @@ module NLPCloud
41
41
  end
42
42
 
43
43
  def generation(text, min_length: nil, max_length: nil, length_no_input: nil,
44
- end_sequence: nil, remove_input: nil, top_k: nil, top_p: nil,
45
- temperature: nil, repetition_penalty: nil, length_penalty: nil)
44
+ end_sequence: nil, remove_input: nil, do_sample: nil, num_beams: nil, early_stopping: nil,
45
+ no_repeat_ngram_size: nil, num_return_sequences: nil, top_k: nil, top_p: nil,
46
+ temperature: nil, repetition_penalty: nil, length_penalty: nil, bad_words: nil)
46
47
  payload = {
47
48
  'text' => text,
48
49
  'min_length' => min_length,
@@ -50,11 +51,17 @@ module NLPCloud
50
51
  'length_no_input' => length_no_input,
51
52
  'end_sequence' => end_sequence,
52
53
  'remove_input' => remove_input,
54
+ 'do_sample' => do_sample,
55
+ 'num_beams' => num_beams,
56
+ 'early_stopping' => early_stopping,
57
+ 'no_repeat_ngram_size' => no_repeat_ngram_size,
58
+ 'num_return_sequences' => num_return_sequences,
53
59
  'top_k' => top_k,
54
60
  'top_p' => top_p,
55
61
  'temperature' => temperature,
56
62
  'repetition_penalty' => repetition_penalty,
57
- 'length_penalty' => length_penalty
63
+ 'length_penalty' => length_penalty,
64
+ 'bad_words' => bad_words
58
65
  }
59
66
  response = RestClient.post("#{@root_url}/generation", payload.to_json, @headers)
60
67
  JSON.parse(response.body)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nlpcloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.12
4
+ version: 1.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julien Salinas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-24 00:00:00.000000000 Z
11
+ date: 2021-09-28 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: 'NLP Cloud serves high performance pre-trained or custom models for NER,
14
14
  sentiment-analysis, classification, summarization, text generation, question answering,