Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /gradio-app_gradio /demo /variable_outputs /run.py
| import gradio as gr | |
| max_textboxes = 10 | |
| def variable_outputs(k): | |
| k = int(k) | |
| return [gr.Textbox(visible=True)]*k + [gr.Textbox(visible=False)]*(max_textboxes-k) | |
| with gr.Blocks() as demo: | |
| s = gr.Slider(1, max_textboxes, value=max_textboxes, step=1, label="How many textboxes to show:") | |
| textboxes = [] | |
| for i in range(max_textboxes): | |
| t = gr.Textbox(f"Textbox {i}") | |
| textboxes.append(t) | |
| s.change(variable_outputs, s, textboxes) | |
| if __name__ == "__main__": | |
| demo.launch() | |
Xet Storage Details
- Size:
- 510 Bytes
- Xet hash:
- c03974b6c2cc554505deee11c0de22173f082b405bd9bc0fb4e70be8a2d052be
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.