replicate/replicate-python

Document how to pass files

bfirsh opened this issue · 2 comments

They can be file objects or URLs.

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.

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.