Update README.md
Browse files
README.md
CHANGED
@@ -50,7 +50,7 @@ The simplest way to perform inference is using the pipeline interface
|
|
50 |
from transformers import pipeline
|
51 |
image_url = "https://fema-cap-imagery.s3.amazonaws.com/Images/CAP_-_Flooding_Spring_2023/Source/IAWG_23-B-5061/A0005/D75_0793_DxO_PL6_P.jpg"
|
52 |
|
53 |
-
pipe = pipeline(model="MITLL/LADI-v2-classifier-
|
54 |
print(pipe(image_url))
|
55 |
```
|
56 |
|
@@ -76,8 +76,8 @@ image_url = "https://fema-cap-imagery.s3.amazonaws.com/Images/CAP_-_Flooding_Spr
|
|
76 |
img_data = requests.get(image_url).content
|
77 |
img = Image.open(BytesIO(img_data))
|
78 |
|
79 |
-
processor = AutoImageProcessor.from_pretrained("MITLL/LADI-v2-classifier-
|
80 |
-
model = AutoModelForImageClassification.from_pretrained("MITLL/LADI-v2-classifier-
|
81 |
|
82 |
inputs = processor(img, return_tensors="pt")
|
83 |
|
|
|
50 |
from transformers import pipeline
|
51 |
image_url = "https://fema-cap-imagery.s3.amazonaws.com/Images/CAP_-_Flooding_Spring_2023/Source/IAWG_23-B-5061/A0005/D75_0793_DxO_PL6_P.jpg"
|
52 |
|
53 |
+
pipe = pipeline(model="MITLL/LADI-v2-classifier-small")
|
54 |
print(pipe(image_url))
|
55 |
```
|
56 |
|
|
|
76 |
img_data = requests.get(image_url).content
|
77 |
img = Image.open(BytesIO(img_data))
|
78 |
|
79 |
+
processor = AutoImageProcessor.from_pretrained("MITLL/LADI-v2-classifier-small")
|
80 |
+
model = AutoModelForImageClassification.from_pretrained("MITLL/LADI-v2-classifier-small")
|
81 |
|
82 |
inputs = processor(img, return_tensors="pt")
|
83 |
|