app.py
CHANGED
@@ -3,8 +3,12 @@ import subprocess
|
|
3 |
|
4 |
def greet(name):
|
5 |
process = subprocess.run(["ls"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
6 |
-
|
7 |
-
|
|
|
|
|
|
|
|
|
8 |
|
9 |
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
10 |
iface.launch()
|
|
|
3 |
|
4 |
def greet(name):
|
5 |
process = subprocess.run(["ls"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
6 |
+
output1 = process.stdout.decode("utf-8")
|
7 |
+
process = subprocess.run(["cat", "pre-requirements.txt"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
8 |
+
output2 = process.stdout.decode("utf-8")
|
9 |
+
process = subprocess.run(["cat", "requirements.txt"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
10 |
+
output3 = process.stdout.decode("utf-8")
|
11 |
+
return output1 + "\n" + output2 + "\n" + output3
|
12 |
|
13 |
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
14 |
iface.launch()
|