Update app.py
Browse files
app.py
CHANGED
@@ -1,8 +1,10 @@
|
|
1 |
-
from transformers import ViTFeatureExtractor, ViTModel
|
2 |
from PIL import Image
|
3 |
import requests
|
4 |
|
5 |
-
|
|
|
|
|
6 |
|
7 |
pipe = pipeline('image-classification', model=model_name, device=0)
|
8 |
|
|
|
1 |
+
from transformers import ViTFeatureExtractor, ViTModel
|
2 |
from PIL import Image
|
3 |
import requests
|
4 |
|
5 |
+
feature_extractor = ViTFeatureExtractor.from_pretrained('google/vit-base-patch16-224-in21k')
|
6 |
+
loaded_model = ViTModel.from_pretrained("runaksh/chest_xray_pneumonia_detection")
|
7 |
+
inputs = feature_extractor(images=image, return_tensors="pt")
|
8 |
|
9 |
pipe = pipeline('image-classification', model=model_name, device=0)
|
10 |
|