async def forward_to_ui(request: Request):
    """
    Forwards the incoming request to the UI endpoint.

    Args:
        request (Request): The incoming HTTP request.

    Returns:
        RedirectResponse: A response object that redirects to the UI endpoint,
                          including any query parameters from the original request.
    """
    query_params = request.query_params
    url = "/ui/"
    if query_params:
        url += f"?{query_params}"
    return RedirectResponse(url=url)

    Forwards the incoming request to the UI endpoint.

    Args:
        request (Request): The incoming HTTP request.

    Returns:
        RedirectResponse: A response object that redirects to the UI endpoint,
                          including any query parameters from the original request.
    
src/autotrain/app/app.py