Space
UI Spaces Echo
ui-spaces/ui-spaces-echo
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()