V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
爱意满满的作品展示区。
scalaer
V2EX  ›  分享创造

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

  •  
  •   scalaer · 40 天前 · 974 次点击
    这是一个创建于 40 天前的主题,其中的信息可能已经有所发展或是发生改变。

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

    Calorie-Calculator

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

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

    9 条回复    2024-03-18 13:15:07 +08:00
    yuuk520
        1
    yuuk520  
       40 天前
    报错咧

    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
        2
    rj  
       40 天前
    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
        3
    scalaer  
    OP
       40 天前
    @rj 你上传的是图片吗?看这个报错好像不是图片
    scalaer
        4
    scalaer  
    OP
       40 天前
    @yuuk520 请求 ip 好像是 cloudflare 不支持的
    xycost233
        5
    xycost233  
       40 天前
    没看到图里面有牛油果和海草呢🤣
    kebamt
        6
    kebamt  
       40 天前
    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
        7
    scalaer  
    OP
       40 天前
    @kebamt 这是模型的限制哈, 图片不能超过 4M
    scalaer
        8
    scalaer  
    OP
       40 天前
    这样看他们的技术栈也是用的 next.js😂
    rj
        9
    rj  
       40 天前
    @scalaer #3 有可能是 GIF 图的问题
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1276 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 17:43 · PVG 01:43 · LAX 10:43 · JFK 13:43
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.