Skip to content

Timeout issue #2823

@chintan-donda

Description

@chintan-donda

I'm developing a Gradio based application. I need to use googletrans lib for language translation.
googletrans lib internally installs httpx. This library uses httpx for HTTP requests so HTTP/2 is supported by default.

My application uses machine learning model inference which takes more than 7-8 seconds sometimes.
After inference, the application sends the response to Gradio front-end which gets showcased in the localhost.

Issue:
Because of default Timeout = 5.0 seconds in httpx, it is causing Gradio application failed to receive the response.

When I change this line to 10 seconds, it works fine.

How can we overwrite this value? Is there any fix?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions