Failed to load versions. Head to the versions page to see all versions for this model.
You're looking at a specific version of this model. Jump to the model overview.
replicate /flan-t5-xl:1457f256
Input
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";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run replicate/flan-t5-xl using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"replicate/flan-t5-xl:1457f256622cd45415aa70c02105a917b39dc96e58601d7c2df5a30d2e3092e7",
{
input: {
top_p: 0.95,
prompt: "What is the capital of Paraguay?",
max_length: 50,
temperature: 0.7,
repetition_penalty: 1
}
}
);
console.log(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 replicate/flan-t5-xl using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"replicate/flan-t5-xl:1457f256622cd45415aa70c02105a917b39dc96e58601d7c2df5a30d2e3092e7",
input={
"top_p": 0.95,
"prompt": "What is the capital of Paraguay?",
"max_length": 50,
"temperature": 0.7,
"repetition_penalty": 1
}
)
print(output)
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 replicate/flan-t5-xl 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": "replicate/flan-t5-xl:1457f256622cd45415aa70c02105a917b39dc96e58601d7c2df5a30d2e3092e7",
"input": {
"top_p": 0.95,
"prompt": "What is the capital of Paraguay?",
"max_length": 50,
"temperature": 0.7,
"repetition_penalty": 1
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Add a payment method to run this model.
By signing in, you agree to our
terms of service and privacy policy
Output
{
"completed_at": "2023-03-03T06:29:43.679396Z",
"created_at": "2023-03-03T06:29:43.262715Z",
"data_removed": false,
"error": null,
"id": "qlx3vtbipvbrjchp6achucxxbq",
"input": {
"top_p": "0.95",
"prompt": "What is the capital of Paraguay?",
"max_length": 50,
"temperature": "0.7",
"repetition_penalty": 1
},
"logs": null,
"metrics": {
"predict_time": 0.337868,
"total_time": 0.416681
},
"output": [
"asunción"
],
"started_at": "2023-03-03T06:29:43.341528Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/qlx3vtbipvbrjchp6achucxxbq",
"cancel": "https://api.replicate.com/v1/predictions/qlx3vtbipvbrjchp6achucxxbq/cancel"
},
"version": "1457f256622cd45415aa70c02105a917b39dc96e58601d7c2df5a30d2e3092e7"
}