call javascript function from python flask