I was running a long text generation app with gradio. The typical time for generate text on my computer is about 5-10 mins. When I used the localhost link as UI frontend, the UI displayed "error" after screen is locked on Windows 11 and did not display output although the backend still worked fine and output the response from LLM.
I tried both Chrome and Edge browser. I tried adding "demo.queue()". The same issue persisted when I used localhost link.
But if I add share=True to the demo.launch(), and use the share link as UI frontend, then screenlock would not cause this error.
Have you searched existing issues? š
[X] I have searched and found no existing issues
Reproduction
import gradio as gr
import time
def upload_file():
time.sleep(600)
return "This is a test"
with gr.Blocks() as demo:
upload_button = gr.UploadButton("Click to Upload a File", file_count="single")
output = gr.Textbox(label="output")
upload_button.upload(upload_file, upload_button, output) # upload_file function here can be
demo.queue()
demo.launch(share=True)
Screenshot
No response
Logs
No response
System Info
Gradio Environment Information:
------------------------------
Operating System: Windows
gradio version: 4.36.1
gradio_client version: 1.0.1
------------------------------------------------
gradio dependencies in your environment:
aiofiles: 23.2.1
altair: 5.3.0
fastapi: 0.111.0
ffmpy: 0.3.2
gradio-client==1.0.1 is not installed.
httpx: 0.27.0
huggingface-hub: 0.23.3
importlib-resources: 6.4.0
jinja2: 3.1.4
markupsafe: 2.1.5
matplotlib: 3.9.0
numpy: 1.26.4
orjson: 3.10.3
packaging: 23.2
pandas: 2.2.2
pillow: 10.3.0
pydantic: 2.7.3
pydub: 0.25.1
python-multipart: 0.0.9
pyyaml: 6.0.1
ruff: 0.4.8
semantic-version: 2.10.0
tomlkit==0.12.0 is not installed.
typer: 0.12.3
typing-extensions: 4.12.2
urllib3: 2.1.0
uvicorn: 0.30.1
authlib; extra == 'oauth' is not installed.
itsdangerous; extra == 'oauth' is not installed.
gradio_client dependencies in your environment:
fsspec: 2024.3.1
httpx: 0.27.0
huggingface-hub: 0.23.3
packaging: 23.2
typing-extensions: 4.12.2
websockets: 11.0.3
Describe the bug
I was running a long text generation app with gradio. The typical time for generate text on my computer is about 5-10 mins. When I used the localhost link as UI frontend, the UI displayed "error" after screen is locked on Windows 11 and did not display output although the backend still worked fine and output the response from LLM.
I tried both Chrome and Edge browser. I tried adding "demo.queue()". The same issue persisted when I used localhost link.
But if I add share=True to the demo.launch(), and use the share link as UI frontend, then screenlock would not cause this error.
Have you searched existing issues? š
Reproduction
Screenshot
No response
Logs
No response
System Info
Severity
I can work around it