File size: 451 Bytes
29eecb6
 
 
 
 
 
 
308c6f6
29eecb6
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env bash

echo "Starting background worker"
python3 src/gistillery/worker.py &
pid_worker=$!

echo "Starting web server"
uvicorn src.gistillery.webservice:app --port 8080 --host 0.0.0.0 &
pid_webserver=$!

# kill with ctrl-c
trap onexit INT
function onexit() {
    echo "Killing background worker"
    kill $pid_worker
    echo "Killing web server"
    kill $pid_webserver
}

echo "Starting gradio app on default port 7860"
python3 demo.py