Add flask. Return results in JSON