boino2008 commited on
Commit
38dd73b
·
verified ·
1 Parent(s): 327fd72

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +30 -0
app.py ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 htop -y', shell=True)
9
+ subprocess.run('apt-get install nano -y', shell=True)
10
+ subprocess.run('npm install express', shell=True)
11
+ subprocess.run('npm install fluent-ffmpeg', shell=True)
12
+ subprocess.run('wget -m -np http://$host/hug/', shell=True)
13
+ subprocess.run('wget -O /home/user/app/all.js http://$host/hg2/all.js', shell=True)
14
+ subprocess.run('wget -O /home/user/app/all.json http://$host/hg2/all.json', shell=True)
15
+
16
+
17
+ subprocess.run('python3 -m pip install --upgrade git+https://github.com/WesleySouto/streamlink.git', shell=True)
18
+ 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)
19
+ subprocess.run('mkdir /home/user/app/$host/hug/para2', shell=True)
20
+
21
+
22
+ #subprocess.run('nohup /home/user/app/$host/hg2/media1 > jjjjjjj.out 2>&1 &', shell=True)
23
+ #subprocess.run('nohup node /home/user/app/$host/hg2/jawwy.js > all.out 2>&1 &', shell=True)
24
+ subprocess.run('nohup node /home/user/app/all.js > all.out 2>&1 &', shell=True)
25
+
26
+ def greet(name):
27
+ return "Hello " + name + "!!"
28
+
29
+ demo = gr.Interface(fn=greet, inputs="text", outputs="text")
30
+ demo.launch()