yonatanbenezra
/
mylora
- Public
- 6 runs
-
H100
Run yonatanbenezra/mylora with an API
Use one of our client libraries to get started quickly.
Set the REPLICATE_API_TOKEN
environment variable
export REPLICATE_API_TOKEN=<paste-your-token-here>
Learn more about authentication
Install Replicate’s Node.js client library
npm install replicate
Run yonatanbenezra/mylora using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
import Replicate from "replicate";
const replicate = new Replicate();
const input = {
prompt: "A clear and sharp photo of Yonatan working on a computer, sitting at a desk in a modern office setting. The background is unblurred, showing an organized workspace with shelves, books, and a coffee mug on the table. The lighting is natural, with soft shadows. The photo is taken from an Android phone perspective, capturing a realistic and detailed composition, with Yonatan focused on his work."
};
const output = await replicate.run("yonatanbenezra/mylora:d45243b657fbb6e9dcfcb76e9030377a144237f6a57bcbed667faae309f9f6c4", { input });
import { writeFile } from "node:fs/promises";
for (const [index, item] of Object.entries(output)) {
await writeFile(`output_${index}.webp`, item);
}
//=> output_0.webp written to disk