Spaces:
Runtime error
Runtime error
Download app.py from joanhightech/CreateDB: direct link, hf CLI and curl.
- Browser
- Download file 415 Bytes
-
https://huggingface.co/spaces/joanhightech/CreateDB/resolve/main/app.py
- Command line
-
hf download hf://spaces/joanhightech/CreateDB/app.py
-
curl -L -o app.py https://huggingface.co/spaces/joanhightech/CreateDB/resolve/main/app.py
415 Bytes
| import gradio as gr | |
| import subprocess | |
| def salut(nom): | |
| with open(r"/home/user/app/data2.txt", "a") as file: | |
| p = subprocess.run(["pwd"], capture_output=True) | |
| file.write(str(p.stdout)) | |
| print("##### " + str(p.stdout) + " #####") | |
| file.write(f"Nom: {nom}\n") | |
| return "Salut " + nom | |
| demo = gr.Interface(fn=salut, inputs="text", outputs="text") | |
| demo.launch(share=True) |