Huggingface space failed after working initially

dlflannery
Thu, 05 Sep 2024 22:58:35 +0000

Same here. Any button.click event in my Gradio python app immediately gives the connection timed out error message . This is not a new app but I have been modifying it so initially suspected it was my code, although the identical code works when I run it locally in VS2022.

Just as a simple test to rule out my app, I commited the following code as app.py:

import os
import gradio as gr

def sum(a, b):
    return str(float(a) + float(b))

with gr.Blocks() as demo:
    input_a = gr.Textbox(label = 'Value 1', value = '0')
    input_b = gr.Textbox(label = 'Value 2', value = '0')
    result_box = gr.Textbox(label = 'Result', value = '0')
    button_go = gr.Button(value = 'GO')
    button_go.click(fn=sum, inputs = [input_a, input_b], outputs = result_box)
demo.launch(share = True)

And get the same error when clicking the GO button. The log shows a slew of pydantic errors (greek to me). (And the code runs fine locally in VS2022)