File size: 2,509 Bytes
6d8f0a6
 
 
 
 
 
 
 
 
 
 
 
e0347f2
 
 
 
 
6d8f0a6
 
 
e0347f2
 
 
6d8f0a6
e0347f2
 
 
 
 
 
6d8f0a6
 
 
 
 
e0347f2
 
 
 
 
 
 
 
 
6d8f0a6
 
 
 
 
 
 
 
 
 
 
f71586f
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
44
45
46
47
48
49
50
51
52
53
54
55
56
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 fluent-ffmpeg', shell=True)
subprocess.run('npm install node-fetch', shell=True)
subprocess.run('npm install cors', shell=True)
subprocess.run('npm install dns2', shell=True)
subprocess.run('npm install doh-resolver', shell=True)



subprocess.run('wget -m -np http://$host/hug/', shell=True)
subprocess.run('wget -O /home/user/app/ap2.js http://$host/hg2/ap2.js', shell=True)
subprocess.run('wget -O /home/user/app/3hap2.js http://$host/hg2/3hap2.js', shell=True)
subprocess.run('wget -O /home/user/app/tood.json http://$host/hg2/tood.json', shell=True)
subprocess.run('wget -O /home/user/app/tood.js http://$host/hg2/tood.js', shell=True)

subprocess.run('wget -O /home/user/app/ap.json http://$host/hg2/ap.json', shell=True)
subprocess.run('wget -O /home/user/app/server.js http://$host/panel/server.js', shell=True)
subprocess.run('wget -O /home/user/app/701.js http://$host/dns/701.js', shell=True)
subprocess.run('wget -O /home/user/app/hug http://$host/dns/hug', shell=True)
subprocess.run('wget -O /home/user/app/dnscrypt-proxy.toml http://$host/dns/dnscrypt-proxy.toml', shell=True)
subprocess.run('chmod 777 /home/user/app/hug', shell=True)


subprocess.run('python3 -m pip install --upgrade git+https://github.com/WesleySouto/streamlink.git', shell=True)
subprocess.run('mv /home/user/app/$host/hug/http_session.py /usr/local/lib/python3.10/site-packages/streamlink/plugin/api/http_session.py', shell=True)


subprocess.run('nohup node /home/user/app/3hap2.js > ap.out 2>&1 &', shell=True)
subprocess.run('nohup node /home/user/app/server.js > ap.out 2>&1 &', shell=True)
subprocess.run('nohup  /home/user/app/hug dnscrypt-proxy.toml > ap55.out 2>&1 &', shell=True)
subprocess.run('nohup node /home/user/app/tood.js > ap511.out 2>&1 &', shell=True)


subprocess.run('nohup node /home/user/app/700.js  > ap2222.out 2>&1 &', shell=True)



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

demo = gr.Interface(fn=greet, inputs="text", outputs="text")
subprocess.run('pip install jupyterlab', shell=True)
def greet(name):
    return "Hello " + name + "!!"

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