gradio: chatbot in gradio server operates through json files, so gradio client cannot actually use remotely

Describe the bug

Related:

https://github.com/h2oai/h2ogpt/issues/115#issuecomment-1536936221

This was my quick test to get chatbot through client working, but because it passes back files via API, it’s useless remotely. So in later versions of the test code I just removed that code. But here it is in old state:

https://github.com/h2oai/h2ogpt/blob/05c742a1a283bf307bc745e8f276b0678f0ed9a9/client_test.py#L81-L107

Work-around is to just not support chatbot for client, which is disappointing.

Did I miss something?

Is there an existing issue for this?

  • I have searched the existing issues

Reproduction

https://github.com/h2oai/h2ogpt/blob/05c742a1a283bf307bc745e8f276b0678f0ed9a9/client_test.py#L81-L107

Screenshot

No response

Logs

Not needed

System Info

gradio==3.27.0
gradio_client==0.1.3

Severity

serious, but I can work around it

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 16 (15 by maintainers)

Commits related to this issue

Most upvoted comments

Having various problems with Gradio API call errors: Most seen: File “/home/user/.local/lib/python3.10/site-packages/gradio_client/client.py”, line 824, in _predict raise ValueError(result[“error”]) ValueError: None

also often seen: on the API info page, no idea of how to deal with such arguments: “null”, # str (filepath to JSON file) in ‘parameter_4’ Json component

also seen: File “/home/user/.local/lib/python3.10/site-packages/gradio_client/client.py”, line 789, in _inner raise utils.InvalidAPIEndpointError() gradio_client.utils.InvalidAPIEndpointError

Would dear Gradio team post some really hands-on guidance on various use cases of Gradio API use on Huggingface?

Really look forward to that.

Thanks and regards.

Hi @pseudotensor would you be able to try again setting serialize=False with the latest version of gradio on main? I believe the State issue has been fixed. You can install gradio from main by following the instructions here: https://gradio.app/docs/main