Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

164
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!