transformers-php icon indicating copy to clipboard operation
transformers-php copied to clipboard

Doc issue: Image to text doesn't support file resources

Open socivdias opened this issue 5 months ago • 0 comments

System Info

TransformersPHP 0.6.1

PHP Version

8.2.25

Environment/Platform

  • [x] Command-line application
  • [x] Web application
  • [ ] Serverless
  • [ ] Other (please specify)

Description

The documentation for the image-to-text task states the following about the texts input parameter:

The image(s) to extract text from. It can be a local file path, a file resource, a URL to an image (local or remote), or an array of these inputs. It's the first argument so there's no need to pass it as a named argument.

But the parameter type is string|array, so a file resource is not accepted.

Besides that, as #95 describes, a remote URL isn't currently supported by the VIPS driver

Reproduction

  1. Create an image-to-text pipeline;
  2. Pass a file resource as the first parameter

socivdias avatar Aug 22 '25 20:08 socivdias