V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
爱意满满的作品展示区。
scalaer

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

  •  
  •   scalaer · Mar 18, 2024 · 2567 views
    This topic created in 772 days ago, the information mentioned may be changed or developed.

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

    Calorie-Calculator

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

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

    9 replies    2024-03-18 13:15:07 +08:00
    yuuk
        1
    yuuk  
       Mar 18, 2024
    报错咧

    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  
       Mar 18, 2024
    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
       Mar 18, 2024
    @rj 你上传的是图片吗?看这个报错好像不是图片
    scalaer
        4
    scalaer  
    OP
       Mar 18, 2024
    @yuuk520 请求 ip 好像是 cloudflare 不支持的
    xycost233
        5
    xycost233  
       Mar 18, 2024
    没看到图里面有牛油果和海草呢🤣
    kebamt
        6
    kebamt  
       Mar 18, 2024
    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
       Mar 18, 2024
    @kebamt 这是模型的限制哈, 图片不能超过 4M
    scalaer
        8
    scalaer  
    OP
       Mar 18, 2024
    这样看他们的技术栈也是用的 next.js😂
    rj
        9
    rj  
       Mar 18, 2024
    @scalaer #3 有可能是 GIF 图的问题
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3386 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 52ms · UTC 11:01 · PVG 19:01 · LAX 04:01 · JFK 07:01
    ♥ Do have faith in what you're doing.