开源一个卡路里计算器, 基于 Google Gemini API

2024-03-18 10:44:56 +08:00
 scalaer

上传食物图片,识别食物,计算卡路里

在线测试地址: https://aicc.gptdevelopment.online/

项目地址: https://github.com/mggger/Calorie-Calculator

2006 次点击
所在节点    分享创造
9 条回复
yuuk
2024-03-18 11:24:50 +08:00
报错咧

Failed to detect food and calories: API call failed with status: 400, { "error": { "code": 400, "message": "User location is not supported for the API use.", "status": "FAILED_PRECONDITION" } }
rj
2024-03-18 11:27:07 +08:00
Failed to detect food and calories: API call failed with status: 400, { "error": { "code": 400, "message": "Add an image to use models/gemini-pro-vision, or switch your model to a text model.", "status": "INVALID_ARGUMENT" } }
scalaer
2024-03-18 11:35:16 +08:00
@rj 你上传的是图片吗?看这个报错好像不是图片
scalaer
2024-03-18 11:35:40 +08:00
@yuuk520 请求 ip 好像是 cloudflare 不支持的
xycost233
2024-03-18 11:51:12 +08:00
没看到图里面有牛油果和海草呢🤣
kebamt
2024-03-18 11:52:40 +08:00
Error
Failed to detect food and calories: API call failed with status: 400, { "error": { "code": 400, "message": "Request payload size exceeds the limit: 4194304 bytes.", "status": "INVALID_ARGUMENT" } }
scalaer
2024-03-18 13:01:04 +08:00
@kebamt 这是模型的限制哈, 图片不能超过 4M
scalaer
2024-03-18 13:01:21 +08:00
这样看他们的技术栈也是用的 next.js😂
rj
2024-03-18 13:15:07 +08:00
@scalaer #3 有可能是 GIF 图的问题

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/1024623

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX