Spaces:
Runtime error
Runtime error
Update app.py
Browse filesrecommitting to force a rebuild
app.py
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
import transformers
|
2 |
from transformers import AutoFeatureExtractor, AutoModelForImageClassification, ViTImageProcessor, ViTForImageClassification
|
3 |
|
4 |
-
|
5 |
image_processor = ViTImageProcessor.from_pretrained('google/vit-base-patch16-224')
|
6 |
extractor = AutoFeatureExtractor.from_pretrained("saved_model_files")
|
7 |
model = AutoModelForImageClassification.from_pretrained("saved_model_files")
|
|
|
8 |
labels = ['affected', 'destroyed', 'no_damage']
|
9 |
|
10 |
def classify(im):
|
|
|
1 |
import transformers
|
2 |
from transformers import AutoFeatureExtractor, AutoModelForImageClassification, ViTImageProcessor, ViTForImageClassification
|
3 |
|
|
|
4 |
image_processor = ViTImageProcessor.from_pretrained('google/vit-base-patch16-224')
|
5 |
extractor = AutoFeatureExtractor.from_pretrained("saved_model_files")
|
6 |
model = AutoModelForImageClassification.from_pretrained("saved_model_files")
|
7 |
+
|
8 |
labels = ['affected', 'destroyed', 'no_damage']
|
9 |
|
10 |
def classify(im):
|