import subprocess
import time


def start_flask(port):
    print('Starting flask')
    subprocess.Popen(['/home/mhmh/anaconda3/envs/pytorch/bin/python', 'askbert.py', str(port)])
    time.sleep(2)

if __name__ == "__main__":
    portbase = 5000
    for i in range(4):
        start_flask(portbase + i)

    time.sleep(100000)
