Alex Gonzalez
commited on
Commit
·
509fdae
1
Parent(s):
527bb0a
Image Dimensions
Browse files
app.py
CHANGED
@@ -10,7 +10,7 @@ model = AutoModelForImageClassification.from_pretrained("dima806/facial_emotions
|
|
10 |
|
11 |
|
12 |
def predict(value) -> str:
|
13 |
-
image = Image.fromarray(value).convert("
|
14 |
inputs = processor(images=image, return_tensors="pt")
|
15 |
outputs = model(**inputs)
|
16 |
logits = outputs.logits
|
|
|
10 |
|
11 |
|
12 |
def predict(value) -> str:
|
13 |
+
image = Image.fromarray(value).convert("LA")
|
14 |
inputs = processor(images=image, return_tensors="pt")
|
15 |
outputs = model(**inputs)
|
16 |
logits = outputs.logits
|