Space

Humanize Demo

rv-spaces/rv-spaces-dup

Show env

rv-spaces committed on October 20, 2026

e76d072050ac598e69e593e54b7d92aafbe68df1Parent 6cdd061Browse files

1 file changed+4 -1

app.py

Modified+4 -1
Lines 1 to 3 become lines 1 to 4
@@ -1,3 +1,4 @@
1Added: import os
12import gradio as gr
23import humanize
34
Lines 5 to 10 become lines 6 to 13
@@ -5,6 +6,8 @@
56 n = int(n or 0)
67 return f"{humanize.intword(n)} / {humanize.naturalsize(n)} / {humanize.ordinal(n)}"
78
9Added: info = f"GREETING={os.environ.get('GREETING')!r}; secret set={bool(os.environ.get('RV_SECRET'))}; secret len={len(os.environ.get('RV_SECRET',''))}"
10Added: print("startup:", info, flush=True)
811demo = gr.Interface(describe, gr.Number(label="A number", value=1234567), gr.Textbox(label="Humanized"),
9Removed: title="rv-spaces humanize demo", api_name="predict")
12Added: title="rv-spaces humanize demo", description=info, api_name="predict")
1013demo.launch()