From 60a89d5f6df7ac1d4f5431e7a927191ff080fbfe Mon Sep 17 00:00:00 2001 From: Lucain Date: Wed, 15 Jan 2025 16:30:47 +0100 Subject: [PATCH] Apply suggestions from code review --- packages/tasks/src/model-libraries-snippets.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/tasks/src/model-libraries-snippets.ts b/packages/tasks/src/model-libraries-snippets.ts index 17bccd8ee..7019b8728 100644 --- a/packages/tasks/src/model-libraries-snippets.ts +++ b/packages/tasks/src/model-libraries-snippets.ts @@ -195,11 +195,7 @@ from huggingface_hub import from_pretrained_keras import tensorflow as tf import requests -# https://github.com/google-research-datasets/scin -IMAGE_URL = "https://storage.googleapis.com/dx-scin-public-data/dataset/images/3445096909671059178.png" -response = requests.get(IMAGE_URL, stream=True) -# Raise an exception if the request fails -response.raise_for_status() +response = requests.get("https://storage.googleapis.com/dx-scin-public-data/dataset/images/3445096909671059178.png") # Load the image into a PIL Image object image = Image.open(response.raw)