Space
Humanize Demo
rv-spaces/rv-spaces-gradio
Show env
rv-spaces committed on October 20, 2026
e76d072050ac598e69e593e54b7d92aafbe68df1Parent 6cdd061Browse files
1 file changed+4 -1
app.py
Modified+4 -1
app.py
Modified+4 -1
| @@ -1,3 +1,4 @@ | |||
| 1 | Added: import os | ||
| 1 | 2 | import gradio as gr | |
| 2 | 3 | import humanize | |
| 3 | 4 | ||
| @@ -5,6 +6,8 @@ | |||
| 5 | 6 | n = int(n or 0) | |
| 6 | 7 | return f"{humanize.intword(n)} / {humanize.naturalsize(n)} / {humanize.ordinal(n)}" | |
| 7 | 8 | ||
| 9 | Added: info = f"GREETING={os.environ.get('GREETING')!r}; secret set={bool(os.environ.get('RV_SECRET'))}; secret len={len(os.environ.get('RV_SECRET',''))}" | ||
| 10 | Added: print("startup:", info, flush=True) | ||
| 8 | 11 | demo = gr.Interface(describe, gr.Number(label="A number", value=1234567), gr.Textbox(label="Humanized"), | |
| 9 | Removed: title="rv-spaces humanize demo", api_name="predict") | ||
| 12 | Added: title="rv-spaces humanize demo", description=info, api_name="predict") | ||
| 10 | 13 | demo.launch() | |