import os import sys import subprocess # Get the current path of this script current_path = os.path.abspath(__file__) print('current_path', current_path) # Get the parent directory of the current script parent_path = os.path.dirname(current_path) print('parent_path', parent_path) # Append the parent directory to the system path sys.path.append(parent_path) print('sys.path', sys.path) # Form the command with the required arguments command = [ 'python', 'injection_main_HF.py', '--mode', 'app' ] # Execute the command subprocess.run(command)