Space

wdtest-a/ptest-vol

Upload app.py with huggingface_hub

wdtest-a committed on October 19, 2026

19a6a87cb5d5e16d9710e42ad7e9ecc24318e364Parent c3ac880Browse files

1 file changed+12 -0

app.py

Added+12 -0
Lines 0 to 0 become lines 1 to 12
@@ -0,0 +1,12 @@
1Added: import gradio as gr, os
2Added: def r(_):
3Added: out=[]
4Added: for root,ds,fs in os.walk("/mnt/m"):
5Added: for f in fs: p=os.path.join(root,f); out.append(p+":"+str(os.path.getsize(p)))
6Added: try: open("/mnt/m/new","w").write("x"); w="writable"
7Added: except Exception as e: w="ro:"+type(e).__name__
8Added: h=""
9Added: try: h=open("/mnt/m/hello.txt").read().strip()
10Added: except Exception as e: h="ERR "+type(e).__name__
11Added: return "|".join(sorted(out))+"|"+w+"|"+h
12Added: gr.Interface(r,"text","text",api_name="predict").launch(server_name="0.0.0.0")