replicate-api 0.1.3 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a596e76f9ab64a522810b88fa4d816f4e3e465938ae9601a9d349c9e4d35bfef
4
- data.tar.gz: 191eca1fd5545dea9127146d36f0aabe8c2ebf552a5647c2a4e43791f46729b7
3
+ metadata.gz: 180c9dd2c75f2335a772aedb8064e410c11afd4aba23b16e85c90b9ea415ff49
4
+ data.tar.gz: 4a2feaf5e3e75f01588b9f1952b847653968358a80ea5c5ddf860c113e10a28f
5
5
  SHA512:
6
- metadata.gz: 93e354f2cd6dcf5897d5222a0438c04c726a3c0e0d9eb9b6f83c5a5e543b3fe2ce04ca78470a3469de9369f2e5d2b3747b7007cf7aa5107dd26ae03ef3800ee9
7
- data.tar.gz: 58b2128c462a265cc7a65ec98b7ece9c43d6e25b354a7b39a9bd256a4b043e5884b6ec600b4fbb281d9c4bccaca18aa09c72a5b7c40fd9aab7b468a9f13215be
6
+ metadata.gz: 50b6f576d2c4c8a72df80278c327014da33eda9cb954873e45730fafb809c8b10fd1544123f08ef8a8b0c257f366d94b3006d641f9845862e3972e3c66e087bb
7
+ data.tar.gz: ad58c277a43eb85171ee303daae1c8142a5543a4071c18c1c76120f4509f2fd5f38166392efc61ed3b70c97a36fa2efe5ab6e5b067ff235f6105c96d302a1c3b
data/README.md CHANGED
@@ -27,7 +27,9 @@ You can run a model and get its output:
27
27
  ```ruby
28
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.3"
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.3
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