Spaces:
Sleeping
Sleeping
File size: 556 Bytes
e9b85bc | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | import gradio as gr
with gr.Blocks() as demo:
input_text = gr.Textbox(label="Input Text")
@gr.render(inputs=input_text, queue=False)
def show_split(text):
if len(text) == 0:
gr.Markdown("## No Input Provided")
else:
for letter in text:
with gr.Row():
text = gr.Textbox(letter, label=f"Letter {letter}")
btn = gr.Button("Clear")
btn.click(lambda: gr.Textbox(value=""), None, text)
if __name__ == "__main__":
demo.launch() |