@eyepop.ai/eyepop 3.14.1 → 3.14.4

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.
package/README.md CHANGED
@@ -161,7 +161,7 @@ const example_image_path = 'examples/example.jpg'
161
161
  model: 'eyepop.person:latest',
162
162
  categoryName: 'person'
163
163
  }]})
164
- let results = await endpoint.process({ path: example_image_path })
164
+ let results = await endpoint.process({ source: { path: example_image_path } })
165
165
  for await (let result of results) {
166
166
  console.log(result)
167
167
  }
@@ -176,7 +176,7 @@ const example_image_path = 'examples/example.jpg'
176
176
  2. Call `endpoint.connect()` before any job is submitted and `endpoint.disconnect()` to release all resources.
177
177
  3. Call `endpoint.changePop(...)` to define the Pop and its components to be executed by the endpoint, in this example
178
178
  to use the ability `eyepop.person` to find all instances of persons in images and videos.
179
- 4.`endpoint.process({path:'examples/example.jpg'})` initiates the upload to the local file to the worker service.
179
+ 4.`endpoint.process({ source: {path:'examples/example.jpg'} })` initiates the upload to the local file to the worker service.
180
180
  The image will be queued and processed immediately when the worker becomes available.
181
181
  The result of endpoint.upload() implements `AsyncIterable<Prediction>` which can be iterated with 'for await' as
182
182
  shown in the example above. Predictions will become available when the submitted file becomes processed by the worker
@@ -189,7 +189,7 @@ const example_image_path = 'examples/example.jpg'
189
189
  ```typescript
190
190
  // ...
191
191
  let stream = fs.createReadStream(example_image_path)
192
- endpoint.upload({ stream: readableStream, mimeType: 'image/jpeg' })
192
+ endpoint.upload({ source: { stream: readableStream, mimeType: 'image/jpeg' } })
193
193
  // ...
194
194
  ```
195
195
 
@@ -217,7 +217,7 @@ const example_image_path = 'examples/example.jpg'
217
217
  const endpoint = await EyePop.workerEndpoint().connect()
218
218
  try {
219
219
  for (let i = 0; i < 100; i++) {
220
- endpoint.process({ path: example_image_path }).then(async results => {
220
+ endpoint.process({ source: { path: example_image_path } }).then(async results => {
221
221
  for await (let result of results) {
222
222
  console.log(`result for #${i}`, result)
223
223
  }
@@ -248,7 +248,7 @@ const example_image_url = 'https://farm2.staticflickr.com/1080/1301049949_532835
248
248
  ;(async () => {
249
249
  const endpoint = await EyePop.workerEndpoint().connect()
250
250
  try {
251
- let results = await endpoint.process({ url: example_image_url })
251
+ let results = await endpoint.process({ source: { url: example_image_url } })
252
252
  for await (let result of results) {
253
253
  console.log(result)
254
254
  }
@@ -271,7 +271,7 @@ const example_video_url = 'https://demo-eyepop-videos.s3.amazonaws.com/test1_vlo
271
271
  ;(async () => {
272
272
  const endpoint = await EyePop.workerEndpoint().connect()
273
273
  try {
274
- let results = await endpoint.process({ url: example_video_url })
274
+ let results = await endpoint.process({ source: { url: example_video_url } })
275
275
  for await (let result of results) {
276
276
  console.log(result)
277
277
  }
@@ -294,7 +294,7 @@ const example_video_url = 'https://demo-eyepop-videos.s3.amazonaws.com/test1_vlo
294
294
  ;(async () => {
295
295
  const endpoint = EyePop.workerEndpoint().connect()
296
296
  try {
297
- let results = await endpoint.process({ url: example_video_url })
297
+ let results = await endpoint.process({ source: { url: example_video_url } })
298
298
  for await (let result of results) {
299
299
  console.log(result)
300
300
  if (result['seconds'] >= 10.0) {