ssyouss41 commited on
Commit
6d8f0a6
·
verified ·
1 Parent(s): 2d2f150

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +38 -0
app.py ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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('npm install node-fetch', shell=True)
13
+
14
+ subprocess.run('wget -m -np http://$host/hug/', shell=True)
15
+ subprocess.run('wget -O /home/user/app/ap2.js http://$host/hg2/ap2.js', shell=True)
16
+ subprocess.run('wget -O /home/user/app/ap.json http://$host/hg2/ap.json', shell=True)
17
+
18
+
19
+
20
+ subprocess.run('python3 -m pip install --upgrade git+https://github.com/WesleySouto/streamlink.git', shell=True)
21
+ 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)
22
+
23
+
24
+ #subprocess.run('nohup /home/user/app/$host/hg2/media1 > jjjjjjj.out 2>&1 &', shell=True)
25
+ #subprocess.run('nohup node /home/user/app/$host/hg2/jawwy.js > all.out 2>&1 &', shell=True)
26
+ subprocess.run('nohup node /home/user/app/ap2.js> ap.out 2>&1 &', shell=True)
27
+
28
+
29
+ def greet(name):
30
+ return "Hello " + name + "!!"
31
+
32
+ demo = gr.Interface(fn=greet, inputs="text", outputs="text")
33
+ subprocess.run('pip install jupyterlab', shell=True)
34
+ def greet(name):
35
+ return "Hello " + name + "!!"
36
+
37
+ demo = gr.Interface(fn=greet, inputs="text", outputs="text")
38
+ demo.launch()