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
To run a model that takes a file input, pass a URL to a publicly accessible file. Or, for smaller files (<10MB), you can convert file data into a base64-encoded data URI and pass that directly:
70
+
To run a model that takes a file input, pass a URL to a publicly accessible file. Or, for smaller files (<10MB), you can pass the data directly.
71
71
72
72
73
73
```js
74
74
import { promisesasfs } from"fs";
75
75
76
-
// Read the file into a buffer
77
-
constdata=awaitfs.readFile("path/to/image.png");
78
-
// Convert the buffer into a base64-encoded string
0 commit comments