Update app.py
Browse files
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
|
| 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()
|
|
|