Readme
This model doesn't have a readme.
Run this model in Node.js with one line of code:
npm install replicate
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import Replicate from "replicate";
import fs from "node:fs";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run qr2ai/prompt_generator using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"qr2ai/prompt_generator:410afb326b6bec9988701a47f004e8bfddea90587d2fd2c5e5ead6ddddc2d56b",
{
input: {
image_pth: "https://replicate.delivery/pbxt/LHPvcPuhfaOKc7awWZemVvQbg1LfBXLe1cSchjPaokW8az79/Screenshot%202024-02-23%20at%206.54.08%E2%80%AFAM.jpg"
}
}
);
// To access the file URL:
console.log(output.url()); //=> "http://example.com"
// To write the file to disk:
fs.writeFile("my-image.png", output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import replicate
Run qr2ai/prompt_generator using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"qr2ai/prompt_generator:410afb326b6bec9988701a47f004e8bfddea90587d2fd2c5e5ead6ddddc2d56b",
input={
"image_pth": "https://replicate.delivery/pbxt/LHPvcPuhfaOKc7awWZemVvQbg1LfBXLe1cSchjPaokW8az79/Screenshot%202024-02-23%20at%206.54.08%E2%80%AFAM.jpg"
}
)
# To access the file URL:
print(output.url())
#=> "http://example.com"
# To write the file to disk:
with open("my-image.png", "wb") as file:
file.write(output.read())
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run qr2ai/prompt_generator using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \
-H "Authorization: Bearer $REPLICATE_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Prefer: wait" \
-d $'{
"version": "qr2ai/prompt_generator:410afb326b6bec9988701a47f004e8bfddea90587d2fd2c5e5ead6ddddc2d56b",
"input": {
"image_pth": "https://replicate.delivery/pbxt/LHPvcPuhfaOKc7awWZemVvQbg1LfBXLe1cSchjPaokW8az79/Screenshot%202024-02-23%20at%206.54.08%E2%80%AFAM.jpg"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
brew install cog
If you don’t have Homebrew, there are other installation options available.
Run this to download the model and run it in your local environment:
cog predict r8.im/qr2ai/prompt_generator@sha256:410afb326b6bec9988701a47f004e8bfddea90587d2fd2c5e5ead6ddddc2d56b \
-i 'image_pth="https://replicate.delivery/pbxt/LHPvcPuhfaOKc7awWZemVvQbg1LfBXLe1cSchjPaokW8az79/Screenshot%202024-02-23%20at%206.54.08%E2%80%AFAM.jpg"'
To learn more, take a look at the Cog documentation.
Run this to download the model and run it in your local environment:
docker run -d -p 5000:5000 --gpus=all r8.im/qr2ai/prompt_generator@sha256:410afb326b6bec9988701a47f004e8bfddea90587d2fd2c5e5ead6ddddc2d56b
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "image_pth": "https://replicate.delivery/pbxt/LHPvcPuhfaOKc7awWZemVvQbg1LfBXLe1cSchjPaokW8az79/Screenshot%202024-02-23%20at%206.54.08%E2%80%AFAM.jpg" } }' \ http://localhost:5000/predictions
To learn more, take a look at the Cog documentation.
Add a payment method to run this model.
By signing in, you agree to our
terms of service and privacy policy
{
"completed_at": "2024-07-16T20:01:27.564681Z",
"created_at": "2024-07-16T19:58:13.230000Z",
"data_removed": false,
"error": null,
"id": "164p8360xsrgj0cgqmftk7bc34",
"input": {
"image_pth": "https://replicate.delivery/pbxt/LHPvcPuhfaOKc7awWZemVvQbg1LfBXLe1cSchjPaokW8az79/Screenshot%202024-02-23%20at%206.54.08%E2%80%AFAM.jpg"
},
"logs": "0%| | 0/30 [00:00<?, ?it/s]\n 3%|▎ | 1/30 [00:01<00:49, 1.71s/it]\n 7%|▋ | 2/30 [00:01<00:22, 1.25it/s]\n 10%|█ | 3/30 [00:02<00:14, 1.87it/s]\n 13%|█▎ | 4/30 [00:02<00:10, 2.58it/s]\n 17%|█▋ | 5/30 [00:02<00:07, 3.28it/s]\n 20%|██ | 6/30 [00:02<00:06, 3.91it/s]\n 23%|██▎ | 7/30 [00:02<00:05, 4.47it/s]\n 27%|██▋ | 8/30 [00:02<00:04, 4.92it/s]\n 30%|███ | 9/30 [00:03<00:03, 5.27it/s]\n 33%|███▎ | 10/30 [00:03<00:03, 5.53it/s]\n 37%|███▋ | 11/30 [00:03<00:03, 5.75it/s]\n 40%|████ | 12/30 [00:03<00:03, 5.91it/s]\n 43%|████▎ | 13/30 [00:03<00:02, 6.00it/s]\n 47%|████▋ | 14/30 [00:03<00:02, 6.10it/s]\n 50%|█████ | 15/30 [00:04<00:02, 6.16it/s]\n 53%|█████▎ | 16/30 [00:04<00:02, 6.20it/s]\n 57%|█████▋ | 17/30 [00:04<00:02, 6.19it/s]\n 60%|██████ | 18/30 [00:04<00:01, 6.20it/s]\n 63%|██████▎ | 19/30 [00:04<00:01, 6.22it/s]\n 67%|██████▋ | 20/30 [00:04<00:01, 6.23it/s]\n 70%|███████ | 21/30 [00:04<00:01, 6.22it/s]\n 73%|███████▎ | 22/30 [00:05<00:01, 6.24it/s]\n 77%|███████▋ | 23/30 [00:05<00:01, 6.26it/s]\n 80%|████████ | 24/30 [00:05<00:00, 6.07it/s]\n 83%|████████▎ | 25/30 [00:05<00:00, 6.11it/s]\n 87%|████████▋ | 26/30 [00:05<00:00, 6.15it/s]\n 90%|█████████ | 27/30 [00:05<00:00, 6.20it/s]\n 93%|█████████▎| 28/30 [00:06<00:00, 6.23it/s]\n 97%|█████████▋| 29/30 [00:06<00:00, 6.22it/s]\n100%|██████████| 30/30 [00:06<00:00, 6.18it/s]\n100%|██████████| 30/30 [00:06<00:00, 4.67it/s]",
"metrics": {
"predict_time": 20.995296208,
"total_time": 194.334681
},
"output": "https://replicate.delivery/pbxt/IVtXFD8mb87gJ5KL1exysRARrrln19ApB7u6leqjcmzXOIJTA/high_res_output.png",
"started_at": "2024-07-16T20:01:06.569385Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/164p8360xsrgj0cgqmftk7bc34",
"cancel": "https://api.replicate.com/v1/predictions/164p8360xsrgj0cgqmftk7bc34/cancel"
},
"version": "410afb326b6bec9988701a47f004e8bfddea90587d2fd2c5e5ead6ddddc2d56b"
}
0%| | 0/30 [00:00<?, ?it/s]
3%|▎ | 1/30 [00:01<00:49, 1.71s/it]
7%|▋ | 2/30 [00:01<00:22, 1.25it/s]
10%|█ | 3/30 [00:02<00:14, 1.87it/s]
13%|█▎ | 4/30 [00:02<00:10, 2.58it/s]
17%|█▋ | 5/30 [00:02<00:07, 3.28it/s]
20%|██ | 6/30 [00:02<00:06, 3.91it/s]
23%|██▎ | 7/30 [00:02<00:05, 4.47it/s]
27%|██▋ | 8/30 [00:02<00:04, 4.92it/s]
30%|███ | 9/30 [00:03<00:03, 5.27it/s]
33%|███▎ | 10/30 [00:03<00:03, 5.53it/s]
37%|███▋ | 11/30 [00:03<00:03, 5.75it/s]
40%|████ | 12/30 [00:03<00:03, 5.91it/s]
43%|████▎ | 13/30 [00:03<00:02, 6.00it/s]
47%|████▋ | 14/30 [00:03<00:02, 6.10it/s]
50%|█████ | 15/30 [00:04<00:02, 6.16it/s]
53%|█████▎ | 16/30 [00:04<00:02, 6.20it/s]
57%|█████▋ | 17/30 [00:04<00:02, 6.19it/s]
60%|██████ | 18/30 [00:04<00:01, 6.20it/s]
63%|██████▎ | 19/30 [00:04<00:01, 6.22it/s]
67%|██████▋ | 20/30 [00:04<00:01, 6.23it/s]
70%|███████ | 21/30 [00:04<00:01, 6.22it/s]
73%|███████▎ | 22/30 [00:05<00:01, 6.24it/s]
77%|███████▋ | 23/30 [00:05<00:01, 6.26it/s]
80%|████████ | 24/30 [00:05<00:00, 6.07it/s]
83%|████████▎ | 25/30 [00:05<00:00, 6.11it/s]
87%|████████▋ | 26/30 [00:05<00:00, 6.15it/s]
90%|█████████ | 27/30 [00:05<00:00, 6.20it/s]
93%|█████████▎| 28/30 [00:06<00:00, 6.23it/s]
97%|█████████▋| 29/30 [00:06<00:00, 6.22it/s]
100%|██████████| 30/30 [00:06<00:00, 6.18it/s]
100%|██████████| 30/30 [00:06<00:00, 4.67it/s]
This model runs on Nvidia L40S GPU hardware. We don't yet have enough runs of this model to provide performance information.
This model doesn't have a readme.
This model is cold. You'll get a fast response if the model is warm and already running, and a slower response if the model is cold and starting up.
This model costs approximately $0.16 to run on Replicate, but this varies depending on your inputs. View more.
Choose a file from your machine
Hint: you can also drag files onto the input
0%| | 0/30 [00:00<?, ?it/s]
3%|▎ | 1/30 [00:01<00:49, 1.71s/it]
7%|▋ | 2/30 [00:01<00:22, 1.25it/s]
10%|█ | 3/30 [00:02<00:14, 1.87it/s]
13%|█▎ | 4/30 [00:02<00:10, 2.58it/s]
17%|█▋ | 5/30 [00:02<00:07, 3.28it/s]
20%|██ | 6/30 [00:02<00:06, 3.91it/s]
23%|██▎ | 7/30 [00:02<00:05, 4.47it/s]
27%|██▋ | 8/30 [00:02<00:04, 4.92it/s]
30%|███ | 9/30 [00:03<00:03, 5.27it/s]
33%|███▎ | 10/30 [00:03<00:03, 5.53it/s]
37%|███▋ | 11/30 [00:03<00:03, 5.75it/s]
40%|████ | 12/30 [00:03<00:03, 5.91it/s]
43%|████▎ | 13/30 [00:03<00:02, 6.00it/s]
47%|████▋ | 14/30 [00:03<00:02, 6.10it/s]
50%|█████ | 15/30 [00:04<00:02, 6.16it/s]
53%|█████▎ | 16/30 [00:04<00:02, 6.20it/s]
57%|█████▋ | 17/30 [00:04<00:02, 6.19it/s]
60%|██████ | 18/30 [00:04<00:01, 6.20it/s]
63%|██████▎ | 19/30 [00:04<00:01, 6.22it/s]
67%|██████▋ | 20/30 [00:04<00:01, 6.23it/s]
70%|███████ | 21/30 [00:04<00:01, 6.22it/s]
73%|███████▎ | 22/30 [00:05<00:01, 6.24it/s]
77%|███████▋ | 23/30 [00:05<00:01, 6.26it/s]
80%|████████ | 24/30 [00:05<00:00, 6.07it/s]
83%|████████▎ | 25/30 [00:05<00:00, 6.11it/s]
87%|████████▋ | 26/30 [00:05<00:00, 6.15it/s]
90%|█████████ | 27/30 [00:05<00:00, 6.20it/s]
93%|█████████▎| 28/30 [00:06<00:00, 6.23it/s]
97%|█████████▋| 29/30 [00:06<00:00, 6.22it/s]
100%|██████████| 30/30 [00:06<00:00, 6.18it/s]
100%|██████████| 30/30 [00:06<00:00, 4.67it/s]