File size: 627 Bytes
c512268
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import gradio as gr

def test_button(name):
    return f"Button {name} clicked! The server is alive."

with gr.Blocks() as demo:
    gr.Markdown("# Dependency Test Space")
    gr.Markdown("If you can see this, the Hugging Face Proxy is working correctly.")
    
    with gr.Row():
        btn1 = gr.Button("Test A")
        btn2 = gr.Button("Test B")
    
    output = gr.Textbox(label="Status Window")
    
    btn1.click(fn=test_button, inputs=[gr.State("A")], outputs=output)
    btn2.click(fn=test_button, inputs=[gr.State("B")], outputs=output)

demo.queue().launch(server_name="0.0.0.0", server_port=7860, ssr_mode=False)