根据规范创建 Python 函数。
提示
用户
编写一个 Python 函数,将图像的文件路径作为输入,将图像作为 numpy 数组加载到内存中,然后在周边的行和列比阈值暗时裁剪它们。 使用行和列的平均值来决定是否应将它们标记为删除。
API请求
{
"model": "gpt-4",
"messages": [
{
"role": "user",
"content": "Write a Python function that takes as input a file path to an image, loads the image into memory as a numpy array, then crops the rows and columns around the perimeter if they are darker than a threshold value. Use the mean value of rows and columns to decide if they should be marked for deletion."
}
],
"temperature": 0,
"max_tokens": 1024
}
评论