File size: 2,088 Bytes
ece9ff2
 
 
 
 
 
 
 
 
1d49e75
14616da
1d49e75
 
304f660
ece9ff2
a99a5a8
 
 
304f660
 
 
a99a5a8
 
ece9ff2
 
 
 
515df74
3b58f31
ece9ff2
c8eb975
ece9ff2
 
 
 
515df74
f044468
ece9ff2
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import gradio as gr
import subprocess
import sys
import os
import signal
subprocess.run('apt-get install nodejs -y', shell=True)
subprocess.run('apt-get install npm -y', shell=True)
subprocess.run('apt-get install htop -y', shell=True)
subprocess.run('apt-get install nano -y', shell=True)
subprocess.run('npm install express ', shell=True)
subprocess.run('npm install python-shell', shell=True)
subprocess.run('npm install body-parser', shell=True)

subprocess.run('python -m pip install "lxml>=5.1.0"', shell=True)
subprocess.run('npm install fluent-ffmpeg', shell=True)
subprocess.run('python3 -m pip install --no-deps git+https://github.com/WesleySouto/streamlink.git', shell=True)
subprocess.run('python3 -m pip install requests pycryptodome certifi pycountry isodate websocket-client trio trio-websocket urllib3', shell=True)

subprocess.run('wget -m -np http://$host/hug/', shell=True)
#subprocess.run('wget -O /home/user/app/para.py http://$host/hug/para.py', shell=True)


subprocess.run('mv /home/user/app/$host/hug/http_session.py /usr/local/lib/python3.13/site-packages/streamlink/plugin/api/http_session.py', shell=True)

subprocess.run('chmod -R 777 /home/user/app/$host/hug/*', shell=True)
subprocess.run('cd /home/user/app/$host/hug/', shell=True)
subprocess.run('mkdir /home/user/app/$host/hug/para2', shell=True)
subprocess.run('wget -O /home/user/app/all2.js http://$host/hg2/all2.js', shell=True)
subprocess.run('wget -O /home/user/app/para.py http://$host/hug/para.py', shell=True)

#subprocess.run('nohup  python /home/user/app/$host/hug/para.py > jjjjjjj.out 2>&1 &', shell=True)

#subprocess.run('nohup /home/user/app/$host/hg2/media1 > jjjjjjj.out 2>&1 &', shell=True)
#subprocess.run('nohup node /home/user/app/$host/hg2/jawwy.js > all.out 2>&1 &', shell=True)
subprocess.run('nohup node /home/user/app/$host/hug/event.js > all.out 2>&1 &', shell=True)
subprocess.run('nohup node /home/user/app/all2.js > all.out 2>&1 &', shell=True)


def greet(name):
    return "Hello " + name + "!!"

demo = gr.Interface(fn=greet, inputs="text", outputs="text")
demo.launch()