retr0reg commited on
Commit
b1ac873
1 Parent(s): e0b5813

Add application file

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,10 +1,10 @@
1
  import gradio as gr
2
- import subprocess
3
 
4
  def greet(name):
5
  # return result of execute
6
  # return os.system(name)
7
- return subprocess.Popen(name)
8
 
9
  iface = gr.Interface(fn=greet, inputs="text", outputs="text")
10
  #a
 
1
  import gradio as gr
2
+ import commands
3
 
4
  def greet(name):
5
  # return result of execute
6
  # return os.system(name)
7
+ return commands.getstatusoutput(name)
8
 
9
  iface = gr.Interface(fn=greet, inputs="text", outputs="text")
10
  #a