Files
facefusion-pinokio/start.js
T
cocktailpeanut 326fa960b7 update
2024-01-04 14:12:21 -05:00

58 lines
839 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',
venv: 'env',
on:
[
{
event: '/(http:\/\/[0-9.:]+)/',
done: true
}
]
}
},
{
method: 'local.set',
params:
{
mode: '{{local.mode}}',
url: '{{input.stdout.match(/(http:\\S+)/gi)[0]}}'
}
},
{
method: 'browser.open',
params:
{
uri: '{{local.url}}',
target: '_blank'
}
}
]
};
return config;
};