Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /gradio-app_gradio /demo /timer_simple /run.py
| import gradio as gr | |
| import random | |
| import time | |
| with gr.Blocks() as demo: | |
| timer = gr.Timer(1) | |
| timestamp = gr.Number(label="Time") | |
| timer.tick(lambda: round(time.time()), outputs=timestamp, api_name="timestamp") | |
| number = gr.Number(lambda: random.randint(1, 10), every=timer, label="Random Number") | |
| with gr.Row(): | |
| gr.Button("Start").click(lambda: gr.Timer(active=True), None, timer) | |
| gr.Button("Stop").click(lambda: gr.Timer(active=False), None, timer) | |
| gr.Button("Go Fast").click(lambda: 0.2, None, timer) | |
| if __name__ == "__main__": | |
| demo.launch() | |
Xet Storage Details
- Size:
- 568 Bytes
- Xet hash:
- fecb2a0c8d861dc82bb463b4246832aef292ed791b3ac337d6ae0d181e7253c5
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.