Update app.py
Browse files
app.py
CHANGED
@@ -24,7 +24,7 @@ def get_emotion(microphone, file_upload, task):
|
|
24 |
|
25 |
logits = model(**test).logits
|
26 |
predicted_ids = torch.argmax(logits, dim=-1)
|
27 |
-
labels = [model.config.id2label[_id] for _id in
|
28 |
return labels
|
29 |
|
30 |
demo = gr.Blocks()
|
|
|
24 |
|
25 |
logits = model(**test).logits
|
26 |
predicted_ids = torch.argmax(logits, dim=-1)
|
27 |
+
labels = [model.config.id2label[_id] for _id in predicted_ids.tolist()]
|
28 |
return labels
|
29 |
|
30 |
demo = gr.Blocks()
|