def generate_s3_url(bucket_name: str, s3_name: str) -> str:
  """Generate public url.

  Generates public url for accessing the uploaded file.

  Args:
    bucket_name: Bucket where file exists.
    s3_name: File name whose URL is to be fetched.

  Returns:
    String, public url.
  """
  s3_name = s3_name.replace(' ', '+')
  return f'https://{bucket_name}.s3.amazonaws.com/{s3_name}'