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

53 天前
 scalaer

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

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

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

1007 次点击
所在节点    分享创造
9 条回复
yuuk520
53 天前
报错咧

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
53 天前
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
53 天前
@rj 你上传的是图片吗?看这个报错好像不是图片
scalaer
53 天前
@yuuk520 请求 ip 好像是 cloudflare 不支持的
xycost233
53 天前
没看到图里面有牛油果和海草呢🤣
kebamt
53 天前
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
53 天前
@kebamt 这是模型的限制哈, 图片不能超过 4M
scalaer
53 天前
这样看他们的技术栈也是用的 next.js😂
rj
53 天前
@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