def install_requirements(params):
    """
    Installs the Python packages listed in the requirements.txt file located in the specified project directory.

    Args:
        params: An object containing the project_name attribute, which specifies the directory of the project.

    Behavior:
        - Checks if a requirements.txt file exists in the project directory.
        - Reads the requirements.txt file and filters out lines starting with a hyphen.
        - Rewrites the filtered requirements back to the requirements.txt file.
        - Uses subprocess to run the pip install command on the requirements.txt file.
        - Logs the installation status.

    Returns:
        None
    """
    # check if params.project_name has a requirements.txt
    if os.path.exists(f"{params.project_name}/requirements.txt"):
        # install the requirements using subprocess, wait for it to finish
        install_list = []

        with open(f"{params.project_name}/requirements.txt", "r", encoding="utf-8") as f:
            for line in f:
                if not line.startswith("-"):
                    install_list.append(line)

        with open(f"{params.project_name}/requirements.txt", "w", encoding="utf-8") as f:
            for line in install_list:
                f.write(line)

        pipe = subprocess.Popen(
            [
                "pip",
                "install",
                "-r",
                "requirements.txt",
            ],
            cwd=params.project_name,
        )
        pipe.wait()
        logger.info("Requirements installed.")
        return
    logger.info("No requirements.txt found. Skipping requirements installation.")
    return

    Installs the Python packages listed in the requirements.txt file located in the specified project directory.

    Args:
        params: An object containing the project_name attribute, which specifies the directory of the project.

    Behavior:
        - Checks if a requirements.txt file exists in the project directory.
        - Reads the requirements.txt file and filters out lines starting with a hyphen.
        - Rewrites the filtered requirements back to the requirements.txt file.
        - Uses subprocess to run the pip install command on the requirements.txt file.
        - Logs the installation status.

    Returns:
        None
    
src/autotrain/trainers/generic/utils.py