Update README.md
Browse files
README.md
CHANGED
@@ -46,7 +46,7 @@ Thus please make sure to feed only fundus image into the model to obtain reasona
|
|
46 |
Use the code below to get started with the model.
|
47 |
|
48 |
```python
|
49 |
-
from transformers import AutoImageProcessor,
|
50 |
import torch
|
51 |
from datasets import load_dataset
|
52 |
|
@@ -54,7 +54,7 @@ dataset = load_dataset("huggingface/cats-image")
|
|
54 |
image = dataset["test"]["image"][0]
|
55 |
|
56 |
processor = AutoImageProcessor.from_pretrained("pamixsun/swinv2_tiny_for_glaucoma_classification")
|
57 |
-
model =
|
58 |
|
59 |
inputs = processor(image, return_tensors="pt")
|
60 |
|
|
|
46 |
Use the code below to get started with the model.
|
47 |
|
48 |
```python
|
49 |
+
from transformers import AutoImageProcessor, Swinv2ForImageClassification
|
50 |
import torch
|
51 |
from datasets import load_dataset
|
52 |
|
|
|
54 |
image = dataset["test"]["image"][0]
|
55 |
|
56 |
processor = AutoImageProcessor.from_pretrained("pamixsun/swinv2_tiny_for_glaucoma_classification")
|
57 |
+
model = Swinv2ForImageClassification.from_pretrained("pamixsun/swinv2_tiny_for_glaucoma_classification")
|
58 |
|
59 |
inputs = processor(image, return_tensors="pt")
|
60 |
|