Giter VIP home page Giter VIP logo

Comments (6)

branaway avatar branaway commented on July 22, 2024 1

I was able to work around the initial hurdle by directly reference a already uploaded image using {path: '/tmp/gradio/.../image.png'} as the image input parameter and the interference was able to progress to the finish and returned me a path of the supposedly result image. However, a 404 raised when I tried to access it. Again the Python client worked fine.

The http sniffer showed that there are lots of heartbeats packs been sent to the server for the Python client, while there was none in case of the JavaScript client.

Update: That was until I upgraded the client to 0.20 from 0.19.4. The latest client refused to run with:

error; Error: There is no endpoint matching that name of fn_index matching that number. at get_endpoint_info (file:///Users/bran/localProjects/hf-instantID/node_modules/@gradio/client/dist/index.js:1798:11) at Client.submit (file:///Users/bran/localProjects/hf-instantID/node_modules/@gradio/client/dist/index.js:1233:51) at file:///Users/bran/localProjects/hf-instantID/gen.js:79:18

from gradio.

branaway avatar branaway commented on July 22, 2024

By the look of the http sniffing captures, the images were never picked up by the client and uploaded. Null paths were sent in place the blob.

from gradio.

abidlabs avatar abidlabs commented on July 22, 2024

cc @hannahblair as I believe you are currently looking into the file handling related issues for the js client

from gradio.

branaway avatar branaway commented on July 22, 2024

I like the event model the js client offers process updating after invoking the submit method on the client, better then the Python model in which case I need to keep polling to find out the progress ( or is it?)

from gradio.

jonigata avatar jonigata commented on July 22, 2024

Same issue. When I read get_endpoint_info, I found that fn_index was undefined. This was because api_map was set to { predict: undefined, js_fn: undefined, js_fn_1: undefined }. When I looked into where api_map was being created, I saw the following code in map_names_to_ids:

fns.forEach(({ api_name, id }) => {
  if (api_name)
    apis[api_name] = id;
});

At this point, the content of fns (from config.dependencies) was as follows, indicating there was no id:

"dependencies": [
  {
    "targets": [
      [
        10,
        "click"
      ],
      [
        0,
        "submit"
      ],
      [
        1,
        "submit"
      ]
    ],
    "inputs": [
      0,
      1
    ],
    "outputs": [
      2
    ],
    "backend_fn": true,
    "js": null,
    "queue": null,
    "api_name": "predict",
    "scroll_to_output": false,
    "show_progress": "full",
    "every": null,
    "batch": false,
    "max_batch_size": 4,
    "cancels": [],
    "types": {
      "continuous": false,
      "generator": false
    },
    "collects_event_data": false,
    "trigger_after": null,
    "trigger_only_on_success": false,
    "trigger_mode": "once",
    "show_api": true,
    "zerogpu": true
  },
  ...
]

from gradio.

Amishmaqbool avatar Amishmaqbool commented on July 22, 2024

I am having same issue when trying to uload an image in node enviourment so later i can connect my node env to react native

from gradio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.