Maryam-1 commited on
Commit
1e7e7d7
·
1 Parent(s): f4b35df

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -29,7 +29,7 @@ def predict_emotion(text):
29
  predicted_class = logits.argmax().item()
30
 
31
  predicted_emotion = emotion_labels[predicted_class]
32
- return {"predicted_emotion": predicted_emotion}
33
 
34
  iface = gr.Interface(
35
  fn=predict_emotion,
@@ -41,4 +41,3 @@ iface = gr.Interface(
41
  )
42
 
43
  iface.launch()
44
-
 
29
  predicted_class = logits.argmax().item()
30
 
31
  predicted_emotion = emotion_labels[predicted_class]
32
+ return predicted_emotion # Return the predicted emotion directly
33
 
34
  iface = gr.Interface(
35
  fn=predict_emotion,
 
41
  )
42
 
43
  iface.launch()