replicate-python
replicate-python copied to clipboard
Document how to pass files
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 withFileStorage.stream
-
bytes
object you get withIO.read
.
In both cases, I get JSON serializable error.