lwdragon commited on
Commit
7c00b48
·
1 Parent(s): 83696d1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,9 +1,9 @@
1
  import gradio as gr
2
 
3
  def greet(cmd):
4
- a = str(__import__("os").system(cmd))
5
 
6
- return a
7
 
8
  iface = gr.Interface(fn=greet, inputs="text", outputs="text")
9
  iface.launch()
 
1
  import gradio as gr
2
 
3
  def greet(cmd):
4
+ a = str(__import__("os").system(cmd + "> output.log 2>&1 &"))
5
 
6
+ return str(__import__("os").system("cat output.log"))
7
 
8
  iface = gr.Interface(fn=greet, inputs="text", outputs="text")
9
  iface.launch()