Dc-4nderson commited on
Commit
8efe80e
·
verified ·
1 Parent(s): 0c0ac39

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -18,7 +18,7 @@ def classify_emotion(image: Image.Image) -> str:
18
  outputs = model(**inputs)
19
  pred = torch.argmax(outputs.logits, dim=1).item()
20
 
21
- label = model.config.id2label[str(pred)]
22
  return f"🧠 Predicted Emotion: **{label}**"
23
 
24
  # Gradio interface
 
18
  outputs = model(**inputs)
19
  pred = torch.argmax(outputs.logits, dim=1).item()
20
 
21
+ label = model.config.id2label[pred]
22
  return f"🧠 Predicted Emotion: **{label}**"
23
 
24
  # Gradio interface