defaultWrite me a poem about Machine Learning.
typetext
{
"max_new_tokens": 512,
"min_new_tokens": -1,
"prompt": "Write me a poem about Machine Learning.",
"repetition_penalty": 1,
"temperature": 0.7,
"top_k": 50,
"top_p": 0.95
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_91d**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run google-deepmind/gemma-7b-it using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"google-deepmind/gemma-7b-it:2790a695e5dcae15506138cc4718d1106d0d475e6dca4b1d43f42414647993d5",
{
input: {
max_new_tokens: 512,
min_new_tokens: -1,
prompt: "Write me a poem about Machine Learning.",
repetition_penalty: 1,
temperature: 0.7,
top_k: 50,
top_p: 0.95
}
}
);
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=r8_91d**********************************
This is your API token. Keep it to yourself.
import replicate
Run google-deepmind/gemma-7b-it using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"google-deepmind/gemma-7b-it:2790a695e5dcae15506138cc4718d1106d0d475e6dca4b1d43f42414647993d5",
input={
"max_new_tokens": 512,
"min_new_tokens": -1,
"prompt": "Write me a poem about Machine Learning.",
"repetition_penalty": 1,
"temperature": 0.7,
"top_k": 50,
"top_p": 0.95
}
)
# The google-deepmind/gemma-7b-it model can stream output as it's running.
# The predict method returns an iterator, and you can iterate over that output.
for item in output:
# https://replicate.com/google-deepmind/gemma-7b-it/api#output-schema
print(item, end="")
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_91d**********************************
This is your API token. Keep it to yourself.
Run google-deepmind/gemma-7b-it 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": "google-deepmind/gemma-7b-it:2790a695e5dcae15506138cc4718d1106d0d475e6dca4b1d43f42414647993d5",
"input": {
"max_new_tokens": 512,
"min_new_tokens": -1,
"prompt": "Write me a poem about Machine Learning.",
"repetition_penalty": 1,
"temperature": 0.7,
"top_k": 50,
"top_p": 0.95
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
In the realm of data, a tale unfolds, Where algorithms dance, tales are told. A machine learning model, a master of craft, Unveils patterns, hidden in the draft. With neural networks, it learns to see, The secrets embedded in data, free. From images to text, it can perceive, And make decisions, beyond belief. The model's mind, a labyrinth of code, Uncovers insights, secrets to be told. It finds relationships, hidden in the past, And predicts future trends, built to last. But beware, dear friend, of biases blind, For algorithms can amplify what's wrong. In fairness and justice, we must stand, To ensure that AI serves our hand. So let us harness this powerful force, For the betterment of humanity's course. With machine learning, we can soar, To heights we've never reached before. A journey into the future, a tale to be told, Where machine learning transforms the old. A tale of progress, a tale of might, A future where data shines so bright.
{
"id": "btssyhlbwyroq35ce25lmtkruy",
"model": "google-deepmind/gemma-7b-it",
"version": "2790a695e5dcae15506138cc4718d1106d0d475e6dca4b1d43f42414647993d5",
"input": {
"max_new_tokens": 512,
"min_new_tokens": -1,
"prompt": "Write me a poem about Machine Learning.",
"repetition_penalty": 1,
"temperature": 0.7,
"top_k": 50,
"top_p": 0.95
},
"logs": "",
"output": [
"\n\n",
"",
"In ",
"the ",
"realm ",
"of ",
"",
"data, ",
"a ",
"tale ",
"",
"unfolds,\n",
"",
"Where ",
"algorithms ",
"",
"dance, ",
"tales ",
"are ",
"",
"told.\n",
"",
"A ",
"machine ",
"learning ",
"",
"model, ",
"a ",
"master ",
"of ",
"",
"craft,\n",
"",
"",
"",
"Unveils ",
"",
"patterns, ",
"hidden ",
"in ",
"the ",
"",
"draft.\n\n",
"",
"With ",
"neural ",
"",
"networks, ",
"it ",
"learns ",
"to ",
"",
"see,\n",
"",
"The ",
"secrets ",
"embedded ",
"in ",
"",
"data, ",
"",
"free.\n",
"",
"From ",
"images ",
"to ",
"",
"text, ",
"it ",
"can ",
"",
"perceive,\n",
"",
"And ",
"make ",
"",
"decisions, ",
"beyond ",
"",
"belief.\n\n",
"",
"The ",
"",
"",
"model's ",
"",
"mind, ",
"a ",
"labyrinth ",
"of ",
"",
"code,\n",
"",
"",
"Uncovers ",
"",
"insights, ",
"secrets ",
"to ",
"be ",
"",
"told.\n",
"",
"It ",
"finds ",
"",
"relationships, ",
"hidden ",
"in ",
"the ",
"",
"past,\n",
"",
"And ",
"predicts ",
"future ",
"",
"trends, ",
"built ",
"to ",
"",
"last.\n\n",
"",
"But ",
"",
"beware, ",
"dear ",
"",
"friend, ",
"of ",
"biases ",
"",
"blind,\n",
"",
"For ",
"algorithms ",
"can ",
"amplify ",
"",
"",
"what's ",
"",
"wrong.\n",
"",
"In ",
"fairness ",
"and ",
"",
"justice, ",
"we ",
"must ",
"",
"stand,\n",
"",
"To ",
"ensure ",
"that ",
"AI ",
"serves ",
"our ",
"",
"hand.\n\n",
"",
"So ",
"let ",
"us ",
"harness ",
"this ",
"powerful ",
"",
"force,\n",
"",
"For ",
"the ",
"betterment ",
"of ",
"",
"",
"humanity's ",
"",
"course.\n",
"",
"With ",
"machine ",
"",
"learning, ",
"we ",
"can ",
"",
"soar,\n",
"",
"To ",
"heights ",
"",
"",
"we've ",
"never ",
"reached ",
"",
"before.\n\n",
"",
"A ",
"journey ",
"into ",
"the ",
"",
"future, ",
"a ",
"tale ",
"to ",
"be ",
"",
"told,\n",
"",
"Where ",
"machine ",
"learning ",
"transforms ",
"the ",
"",
"old.\n",
"",
"A ",
"tale ",
"of ",
"",
"progress, ",
"a ",
"tale ",
"of ",
"",
"might,\n",
"",
"A ",
"future ",
"where ",
"data ",
"shines ",
"so ",
"",
"",
"bright."
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2024-02-21T21:11:14.580859Z",
"started_at": "2024-02-21T21:11:14.622199Z",
"completed_at": "2024-02-21T21:11:23.562266Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/btssyhlbwyroq35ce25lmtkruy/cancel",
"get": "https://api.replicate.com/v1/predictions/btssyhlbwyroq35ce25lmtkruy",
"stream": "https://streaming-api.svc.us.c.replicate.net/v1/streams/qelc5njozompuurkw5dxtgl3rie63v74sltpkwzb6inromxub6bq"
},
"metrics": {
"predict_time": 8.940067,
"total_time": 8.981407
}
}