mirror of
https://github.com/facefusion/facefusion-pinokio.git
synced 2026-05-05 12:45:12 +02:00
60 lines
842 B
JavaScript
60 lines
842 B
JavaScript
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;
|
|
};
|