Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

167
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda