replicate-python icon indicating copy to clipboard operation
replicate-python copied to clipboard

Document how to pass files

Open bfirsh opened this issue 2 years ago • 2 comments

They can be file objects or URLs.

bfirsh avatar Sep 24 '22 04:09 bfirsh

I'm having trouble with this, documented here: https://stackoverflow.com/questions/73927137/file-not-found-by-python-openai-whisper

I've answered my own question on stackoverflow. Need to use path objects.

hbarnard avatar Oct 02 '22 16:10 hbarnard

OK, I am trying to pass a werkzeug FileStorage object to the whisper api. I have tried passing:

  • IO[bytes] object you get with FileStorage.stream
  • bytes object you get with IO.read.

In both cases, I get JSON serializable error.

muddi900 avatar Mar 22 '23 07:03 muddi900