1.下载api返回数据
2.观察数据形式
数据包含了api对上传照片的各项数据的测量。
3.分析根据数据生成报告
的代码
4.大模型处理并添加数据
发送数据
if (imagetype === 'face') {
fetch('http://127.0.0.1:5000/getresult1', {
method: 'POST',
})
.then(response => response.json())
.then(data => {
console.log(data)
console.log(did)
$.ajax({
url: '/update2',
type: 'POST',
contentType: 'application/json',
data: JSON.stringify({
input: data,
did: did,
type:imagetype,
role:role
}),
success: function (data) {
appendMessage('partner', data.response);
},
error: function(error) {
console.error('Error:', error);
}
});
})
} else if (imagetype === 'beside') {
fetch('http://127.0.0.1:5000/getresult', {
method: 'POST',
})
.then(response => response.json())
.then(data => {
console.log(data)
$.ajax({
url: '/update2',
type: 'POST',
contentType: 'application/json',
data: JSON.stringify({
input: data,
did: did,
type:imagetype
}),
success: function(data) {
appendMessage('partner', data.response);
},
error: function(error) {
console.error('Error:', error);
}
});
})
}
模型数据并处理
根据数据的不同(面部和头侧)生成不同的分析
上传