Alex Gonzalez commited on
Commit
266102b
·
1 Parent(s): 509fdae

Converts to Greyscale RGB

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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("LA")
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("L").convert("RGB")
14
  inputs = processor(images=image, return_tensors="pt")
15
  outputs = model(**inputs)
16
  logits = outputs.logits