INNER CODE UNIT · Python

full_file_path

openfoodfacts/openfoodfacts-ai · category-detection/main.py:287

    full_file_path = base_dir / file_path
    async with aiofiles.open(full_file_path, "rb") as f:
        return await f.read()


async def upload_to_gcs(
    image_url: str,
    bucket_name: str,
    blob_name: str,
    session: aiohttp.ClientSession,
    base_image_dir: Path | None = None,
) -> dict:
    """Upload data to Google Cloud Storage.
    Args:
        bucket_name (str): Name of the GCS bucket.
        blob_name (str): Name of the blob (object) in the bucket.
        data (bytes): Data to upload.
        session (aiohttp.ClientSession): HTTP session to use for downloading

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…