You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some models, like [methexis-inc/img2prompt](https://replicate.com/methexis-inc/img2prompt), receive images as inputs. To pass a file as an input, use a file handle or URL:
45
+
Some models, like [andreasjansson/blip-2](https://replicate.com/andreasjansson/blip-2), have files as inputs.
46
+
To run a model that takes a file input,
47
+
pass a URL to a publicly accessible file.
48
+
Or, for smaller files (<10MB), you can pass a file handle directly.
@@ -79,28 +82,6 @@ Some models, like [methexis-inc/img2prompt](https://replicate.com/methexis-inc/i
79
82
>print(results)
80
83
>```
81
84
82
-
To run a model that takes a fileinput, pass a URL to a publicly accessible file. Or, for smaller files (<10MB), you can convert file data into a base64-encoded data URIandpass that directly:
83
-
84
-
```
85
-
# Run andreasjansson/blip-2:f677695e by providing an image from local file system which is base64 encoded by files.py
86
-
import replicate
87
-
import base64
88
-
89
-
# This reads an example image `gg_bridge.jpeg` from current working directory into a buffer and into the prediction request
0 commit comments