Space

UI Spaces Echo

ui-spaces/ui-spaces-echo-copy

308 BHistoryRawDownload
Viewing revision5633e0fView main files
import gradio as gr
import humanize


def echo(text):
    n = len(text or "")
    return f"{text} ({n} characters, {humanize.apnumber(n)})"


demo = gr.Interface(fn=echo, inputs=gr.Textbox(label="Text"), outputs=gr.Textbox(label="Echo"), title="UI Spaces Echo")

if __name__ == "__main__":
    demo.launch()