【发布时间】:2021-08-23 18:28:01
【问题描述】:
我目前正在构建一个用于面部检测的反应应用程序。我使用下面的代码来实现 Clarifai 人脸检测 API,但我得到 404 错误而不是响应。我的语法错了吗?
const Clarifai = require("clarifai");
const app = new Clarifai.App({
apiKey: "my-api-key",
});
app.models
.predict(
"45fb9a671625463fa646c3523a3087d5",
this.state.input
)
.then(
function (response) {
// do something with response
console.log(response);
},
function (err) {
// there was an error
}
);
【问题讨论】: