Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

165
Visualizações
How to launch Python neuronet script from JS script in local html page in Chrome?

I searched a lot but didn't find any answers. I have html, js and css files and trained stargan net. I need to launch stargan generator from js script to generate new images from webcam screenshot. So question is how i can launch .py file directly or with cmd. All should be local, because I don't have server and launcing all directly from files.

I tryied ActiveX

var cmd = new ActiveXObject("WScript.Shell"); //создаем объект шел
myApp = cmd.Exec("C:\Users\User\Documents\star and co\stargan2-master\python src/test.py --source tst/me1.jpg --model train/mydata/mydata-256-9-005.ckpt");
while (myApp.Status === 0)  
    {
        WScript.Sleep(100);//пауза что бы не перегружать проц
    }

but it didn't work in case of I using chrome. IE Tabs didn't help also, it causes new problems with function definition and using. Also i tryied this:

var process = require('child_process');
        process.exec('C:\Users\User\Documents\star and co\stargan2-master\python src/test.py --source tst/me1.jpg --model train/mydata/mydata-256-9-005.ckpt"',function (err,stdout,stderr) {
            if (err) {
                console.log("\n"+stderr);
            } else {
                console.log(stdout);
            }
        });

but it also didn't help because I don't have node.js => can't use require(as I understood). So will be glad to see some more variants, how to make idea possible, or how to fix this one's

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda