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.
Image input
Propmt
Run this model in Node.js with one line of code:
npm install replicate
REPLICATE_API_TOKEN
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 cuuupid/glm-4v-9b using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "cuuupid/glm-4v-9b:a75c919339f65bf00afa96511af653fdbd0ec3cb0f5e6f4350809445eee0e14f", { input: { image: "https://replicate.delivery/pbxt/L4yoSgMNJ5AZ7NbzR4RfcAmofQqEfzVKDyI3MB6lnxeWn7dF/image.png", prompt: "请详细总结图片中文章的要点" } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
import replicate
output = replicate.run( "cuuupid/glm-4v-9b:a75c919339f65bf00afa96511af653fdbd0ec3cb0f5e6f4350809445eee0e14f", input={ "image": "https://replicate.delivery/pbxt/L4yoSgMNJ5AZ7NbzR4RfcAmofQqEfzVKDyI3MB6lnxeWn7dF/image.png", "prompt": "请详细总结图片中文章的要点" } ) print(output)
To learn more, take a look at the guide on getting started with Python.
curl -s -X POST \ -H "Authorization: Bearer $REPLICATE_API_TOKEN" \ -H "Content-Type: application/json" \ -H "Prefer: wait" \ -d $'{ "version": "cuuupid/glm-4v-9b:a75c919339f65bf00afa96511af653fdbd0ec3cb0f5e6f4350809445eee0e14f", "input": { "image": "https://replicate.delivery/pbxt/L4yoSgMNJ5AZ7NbzR4RfcAmofQqEfzVKDyI3MB6lnxeWn7dF/image.png", "prompt": "请详细总结图片中文章的要点" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{ "completed_at": "2024-06-11T19:01:58.824344Z", "created_at": "2024-06-11T19:01:54.911000Z", "data_removed": false, "error": null, "id": "f73kdvx0bxrgm0cg12pv37en24", "input": { "image": "https://replicate.delivery/pbxt/L4yoSgMNJ5AZ7NbzR4RfcAmofQqEfzVKDyI3MB6lnxeWn7dF/image.png", "prompt": "请详细总结图片中文章的要点" }, "logs": null, "metrics": { "predict_time": 3.858129, "total_time": 3.913344 }, "output": "这篇文章主要介绍了面壁Ultra对齐技术在大模型上的应用。面壁Ultra是一种高效的大模型训练技术,它通过自监督预训练和迁移学习等技术,在大规模数据集上进行训练,从而提高模型的性能和泛化能力。文章还提到了面壁Ultra的一些特点和优势,例如数据质量、模型结构等。此外,文章还提到了面壁Ultra在实际应用中的效果,如SFT和KTO等任务的性能提升。 <|endoftext|>", "started_at": "2024-06-11T19:01:54.966215Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/f73kdvx0bxrgm0cg12pv37en24", "cancel": "https://api.replicate.com/v1/predictions/f73kdvx0bxrgm0cg12pv37en24/cancel" }, "version": "a75c919339f65bf00afa96511af653fdbd0ec3cb0f5e6f4350809445eee0e14f" }
Choose a file from your machine
Hint: you can also drag files onto the input