app.py
CHANGED
@@ -1,7 +1,10 @@
|
|
1 |
import gradio as gr
|
|
|
2 |
|
3 |
def greet(name):
|
4 |
-
|
|
|
|
|
5 |
|
6 |
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
7 |
iface.launch()
|
|
|
1 |
import gradio as gr
|
2 |
+
import subprocess
|
3 |
|
4 |
def greet(name):
|
5 |
+
process = subprocess.run(["ls"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
6 |
+
output = process.stdout.decode("utf-8")
|
7 |
+
return "Hello " + name + "!!" + output
|
8 |
|
9 |
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
10 |
iface.launch()
|