Comments (6)
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.
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.
cc @hannahblair as I believe you are currently looking into the file handling related issues for the js client
from gradio.
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.
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.
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)
- Redesign tabs
- Improve drag and drop area UX
- Refresh button designs
- Dataframe refresh HOT 3
- Better data capture story? HOT 3
- Gradio Demo and FastAPI Docs are executed simultaneously despite having the queue set up. HOT 1
- gr.DateTime documentation issue <- duplicated TextBox, not DateTime. HOT 3
- Gradio Chatbot Doesn't Have Outputs HOT 3
- SSR
- Markdown latex bmatrix wrapped error
- MultimodalTextbox - file_types seems not to be working? HOT 2
- Add option to loop audio component when it is played HOT 1
- Can't hide clear button with `clear_button=None` HOT 1
- Gradio embedded in Static HTML cannot cp to clipboard HOT 1
- No response when using gr.image in chatinterface in second round HOT 1
- Disable like/dislike from input message HOT 1
- Uncaught (in promise) DOMException: Could not start video source HOT 1
- Scrollbar of chatbot doesn't work if examples are included HOT 4
- Wrong Required Param Check in JavaScript Client
- Dataframe change event not triggered for header modification HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gradio.