requests1 / app.py
yoon2566's picture
Update app.py
693d07a verified
raw
history blame contribute delete
515 Bytes
import gradio as gr
aaa = 10
def bbb():
global aaa
if aaa % 2 == 0:
return "LED on"
else:
return "LED off"
def increment():
global aaa
aaa += 1
if aaa % 2 == 0:
return "LED on"
else:
return "LED off"
with gr.Blocks() as demo:
gr.Markdown('ledledled')
gr.Markdown('https://yoon2566-requests1.hf.space')
ccc = gr.Markdown()
btn = gr.Button("Increase")
demo.load(bbb, outputs=ccc)
btn.click(increment, outputs=ccc)
demo.launch()