replicate-api 0.1.2 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bdc195548bd20d60b90ad926efc9a045dabf09f932b9a5a41ee693b394cce59c
4
- data.tar.gz: 1058816a27e6fcdbe4853df7d2bb4c102ddaee92933e6b00309dbcd4b8a463d2
3
+ metadata.gz: 180c9dd2c75f2335a772aedb8064e410c11afd4aba23b16e85c90b9ea415ff49
4
+ data.tar.gz: 4a2feaf5e3e75f01588b9f1952b847653968358a80ea5c5ddf860c113e10a28f
5
5
  SHA512:
6
- metadata.gz: e35c8e77c74981fb177a8b325ba36658eee0195163166773697fb1d3c6133ccac29af72f14b1891575687d6a1c5040a98ee0e2e8f8a1027cdf5843bdb67757ab
7
- data.tar.gz: 0f04b274aee7be57ab8f266cb87c5daacf83ef8581310afca9d4b416d1077e138d2766b9b57cf267f3a72058ad058e36c225f0ddfddf06379a5ec48b33593998
6
+ metadata.gz: 50b6f576d2c4c8a72df80278c327014da33eda9cb954873e45730fafb809c8b10fd1544123f08ef8a8b0c257f366d94b3006d641f9845862e3972e3c66e087bb
7
+ data.tar.gz: ad58c277a43eb85171ee303daae1c8142a5543a4071c18c1c76120f4509f2fd5f38166392efc61ed3b70c97a36fa2efe5ab6e5b067ff235f6105c96d302a1c3b
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- replicate-api (0.1.0)
4
+ replicate-api (0.1.2)
5
5
  faraday (~> 2.7.1)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -25,9 +25,11 @@ Or install it yourself as:
25
25
  You can run a model and get its output:
26
26
 
27
27
  ```ruby
28
- replicate = Replicate::Client.new(api_key: "#{YOUR API KEY HERE}")
28
+ replicate = Replicate::Client.new(token: "#{YOUR API KEY HERE}")
29
29
  model = replicate.models("stability-ai/stable-diffusion")
30
- model.predict(prompt="a 19th century portrait of a wombat gentleman")
30
+ height = 786
31
+ width = 574
32
+ model.predict(prompt: "a 19th century portrait of a wombat gentleman", width: width, height: height)
31
33
  ```
32
34
 
33
35
  ## Contributing
@@ -9,7 +9,7 @@ module Replicate
9
9
  @version_id = response.body["latest_version"]["id"]
10
10
  end
11
11
 
12
- def predict(prompt:, height = 512, width = 512)
12
+ def predict(prompt: "", height: 512, width: 512, image: "")
13
13
  body = {version: @version_id, input: {prompt: prompt, height: height, width: width}}
14
14
  response = @client.requests(method: "POST", path: "predictions", **body)
15
15
  poll(prediction_id: response.body["id"])
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Replicate
4
- VERSION = "0.1.2"
4
+ VERSION = "0.2.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: replicate-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Olivia Li
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-12-06 00:00:00.000000000 Z
11
+ date: 2022-12-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday