THP2903 commited on
Commit
b432c3c
·
verified ·
1 Parent(s): 1fcfc81

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -123,8 +123,11 @@ def predict_emotion_with_chat(video_path):
123
 
124
  # Connect to the chat server
125
  socketio.emit('message', {'client': 'Emotion Recognition', 'message': f'Predicted emotion: {predicted_emotion}'})
 
 
 
126
 
127
- return last_frame, audio_path, predicted_emotion
128
 
129
  # Gradio Interface
130
  iface = gr.Interface(
@@ -151,5 +154,5 @@ def handle_message(message):
151
  emit('message', message, broadcast=True)
152
 
153
  if __name__ == '__main__':
154
- iface.launch()
155
- socketio.run(app, debug=True)
 
123
 
124
  # Connect to the chat server
125
  socketio.emit('message', {'client': 'Emotion Recognition', 'message': f'Predicted emotion: {predicted_emotion}'})
126
+
127
+ # Get messages from the chat server
128
+ messages = [] # This should be updated with real messages from the server
129
 
130
+ return last_frame, audio_path, predicted_emotion, messages
131
 
132
  # Gradio Interface
133
  iface = gr.Interface(
 
154
  emit('message', message, broadcast=True)
155
 
156
  if __name__ == '__main__':
157
+ iface.launch(share=True)
158
+ socketio.run(app, debug=True)