forked from facefusion/facefusion-pinokio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstart.js
59 lines (58 loc) · 842 Bytes
/
start.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
module.exports = () =>
{
const config =
{
daemon: true,
cmd:
{
Default: 'python run.py',
Benchmark: 'python run.py --ui-layouts benchmark',
Webcam: 'python run.py --ui-layouts webcam'
},
run:
[
{
method: 'local.set',
params:
{
mode: '{{ input.mode }}'
}
},
{
method: 'shell.run',
params:
{
message: '{{ self.cmd[local.mode] }}',
path: 'facefusion',
conda:
{
name: 'facefusion'
},
on:
[
{
event: '/(http:\/\/[0-9.:]+)/',
done: true
}
]
}
},
{
method: 'local.set',
params:
{
url: '{{ input.stdout.match(/(http:\\S+)/gi)[0] }}'
}
},
{
method: 'browser.open',
params:
{
uri: '{{ local.url }}',
target: '_blank'
}
}
]
};
return config;
};