nlpcloud 1.0.38 → 1.0.40
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/nlpcloud.rb +13 -2
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 64685ed4b295b167ab3c6fc9a9e58457fc977de7ff9aa139058fff708f640b32
|
4
|
+
data.tar.gz: 403f83f4bf769784f9bc24efc666fc207716064547e66e0262eb5d0995c7a4bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad01d8ff341c56a4c47fa061c0385f5ad3c585693bffceb8c30b8a9faeb928e6759d0948d4da68516dcd9a7ef03a09a2d698015eb1efe1bc6c1512be53347a5f
|
7
|
+
data.tar.gz: de1007facb5017657422c44aa20cd2cc57588e5ae448a53eb22430fce1bdeb10fd256773427f67f08d8c41906e91128438cbc566ce1e18bf24c2f69e50940b1c
|
data/lib/nlpcloud.rb
CHANGED
@@ -125,7 +125,8 @@ module NLPCloud
|
|
125
125
|
def generation(text, min_length: nil, max_length: nil, length_no_input: nil,
|
126
126
|
end_sequence: nil, remove_input: nil, do_sample: nil, num_beams: nil, early_stopping: nil,
|
127
127
|
no_repeat_ngram_size: nil, num_return_sequences: nil, top_k: nil, top_p: nil,
|
128
|
-
temperature: nil, repetition_penalty: nil, length_penalty: nil, bad_words: nil, remove_end_sequence: nil
|
128
|
+
temperature: nil, repetition_penalty: nil, length_penalty: nil, bad_words: nil, remove_end_sequence: nil,
|
129
|
+
is_instruct: nil)
|
129
130
|
payload = {
|
130
131
|
'text' => text,
|
131
132
|
'min_length' => min_length,
|
@@ -144,7 +145,8 @@ module NLPCloud
|
|
144
145
|
'repetition_penalty' => repetition_penalty,
|
145
146
|
'length_penalty' => length_penalty,
|
146
147
|
'bad_words' => bad_words,
|
147
|
-
'remove_end_sequence' => remove_end_sequence
|
148
|
+
'remove_end_sequence' => remove_end_sequence,
|
149
|
+
'is_instruct' => is_instruct
|
148
150
|
}
|
149
151
|
response = RestClient.post("#{@root_url}/generation", payload.to_json, @headers)
|
150
152
|
JSON.parse(response.body)
|
@@ -245,6 +247,15 @@ module NLPCloud
|
|
245
247
|
JSON.parse(response.body)
|
246
248
|
end
|
247
249
|
|
250
|
+
def speech_synthesis(text, voice: nil)
|
251
|
+
payload = {
|
252
|
+
'text' => text,
|
253
|
+
'voice' => voice
|
254
|
+
}
|
255
|
+
response = RestClient.post("#{@root_url}/speech-synthesis", payload.to_json, @headers)
|
256
|
+
JSON.parse(response.body)
|
257
|
+
end
|
258
|
+
|
248
259
|
def summarization(text, size: nil)
|
249
260
|
payload = {
|
250
261
|
'text' => text,
|
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.
|
4
|
+
version: 1.0.40
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Julien Salinas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-04-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -29,10 +29,10 @@ description: 'NLP Cloud serves high performance pre-trained or custom models for
|
|
29
29
|
correction, keywords and keyphrases extraction, chatbot, product description and
|
30
30
|
ad generation, intent classification, text generation, image generation, code generation,
|
31
31
|
blog post generation, question answering, automatic speech recognition, machine
|
32
|
-
translation, language detection, semantic search, semantic similarity,
|
33
|
-
POS tagging, embeddings, and dependency parsing. It is ready for production,
|
34
|
-
through a REST API. This is the Ruby client for the API. More details here:
|
35
|
-
Documentation: https://docs.nlpcloud.io.'
|
32
|
+
translation, language detection, semantic search, semantic similarity, speech synthesis,
|
33
|
+
tokenization, POS tagging, embeddings, and dependency parsing. It is ready for production,
|
34
|
+
served through a REST API. This is the Ruby client for the API. More details here:
|
35
|
+
https://nlpcloud.io. Documentation: https://docs.nlpcloud.io.'
|
36
36
|
email: all@juliensalinas.com
|
37
37
|
executables: []
|
38
38
|
extensions: []
|