Spaces:
Runtime error
Runtime error
Updated from colab
Browse files
app.py
CHANGED
@@ -7,8 +7,6 @@ import matplotlib.pyplot as plt
|
|
7 |
feature_extractor = AutoFeatureExtractor.from_pretrained("brendenc/my-segmentation-model")
|
8 |
model = AutoModelForImageClassification.from_pretrained("brendenc/my-segmentation-model")
|
9 |
|
10 |
-
labels = dataset['train'].features['labels'].names
|
11 |
-
|
12 |
def classify(im):
|
13 |
inputs = extractor(images=im, return_tensors="pt").to("cuda")
|
14 |
outputs = model(**inputs)
|
|
|
7 |
feature_extractor = AutoFeatureExtractor.from_pretrained("brendenc/my-segmentation-model")
|
8 |
model = AutoModelForImageClassification.from_pretrained("brendenc/my-segmentation-model")
|
9 |
|
|
|
|
|
10 |
def classify(im):
|
11 |
inputs = extractor(images=im, return_tensors="pt").to("cuda")
|
12 |
outputs = model(**inputs)
|