Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -6,8 +6,8 @@ import time
|
|
6 |
|
7 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
8 |
|
9 |
-
processor = ViTImageProcessor.from_pretrained("
|
10 |
-
model = ViTForImageClassification.from_pretrained("
|
11 |
|
12 |
def predict(image):
|
13 |
inputs = processor(images=image, return_tensors="pt").to(device)
|
|
|
6 |
|
7 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
8 |
|
9 |
+
processor = ViTImageProcessor.from_pretrained("ViT_LCZs_v2",local_files_only=True)
|
10 |
+
model = ViTForImageClassification.from_pretrained("ViT_LCZs_v2",local_files_only=True).to(device)
|
11 |
|
12 |
def predict(image):
|
13 |
inputs = processor(images=image, return_tensors="pt").to(device)
|