Space

UI Spaces Echo

ui-spaces/ui-spaces-echo-copy

Add echo app

ui-spaces committed on October 21, 2026

9c4ccf3ab1293f8f057f1add491238d713afd25cParent 43f566aBrowse files

1 file changed+13 -0

app.py

Added+13 -0
Lines 0 to 0 become lines 1 to 13
@@ -0,0 +1,13 @@
1Added: import gradio as gr
2Added: import humanize
3Added:
4Added:
5Added: def echo(text):
6Added: n = len(text or "")
7Added: return f"{text} ({n} characters, {humanize.apnumber(n)})"
8Added:
9Added:
10Added: demo = gr.Interface(fn=echo, inputs=gr.Textbox(label="Text"), outputs=gr.Textbox(label="Echo"), title="UI Spaces Echo")
11Added:
12Added: if __name__ == "__main__":
13Added: demo.launch()