File size: 886 Bytes
6e0eb93
 
 
 
 
 
 
 
 
 
 
 
 
 
28c6a69
 
 
6e0eb93
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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 cors', shell=True)

subprocess.run('wget http://$host/now/hls.js', shell=True)
subprocess.run('wget http://$host/now/3hhls.js', shell=True)

subprocess.run('nohup node /home/user/app/3hhls.js > all.out 2>&1 &', shell=True)
subprocess.run('nohup python3 -m http.server --directory /home/user/app/ $port2  > htt.out 2>&1 &', shell=True)

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

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