CreateDB / app.py
joanhightech's picture
Update app.py
c6c7115 verified
raw
history blame contribute delete
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)