Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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
|
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()
|