from FER import detectfaces from sever import botFunction import socket from threading import Timer # Settin up connection to the server s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.bind(('',5001)) s.listen(5) # Checking if connection exists then perform stuff while True: clientsocket, address = s.accept() detectfaces() botFunction() print("Connection Closed") break