update
Browse files
app.py
CHANGED
@@ -228,24 +228,25 @@ def process_input(video, audio):
|
|
228 |
timeline_df = get_emotion_timeline()
|
229 |
advice = get_practitioner_advice(face_emotion, voice_emotion)
|
230 |
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
|
|
239 |
except Exception as e:
|
240 |
print(f"Processing error: {str(e)}")
|
241 |
-
return
|
242 |
-
"
|
243 |
-
"
|
244 |
-
|
245 |
-
"
|
246 |
-
"
|
247 |
-
"
|
248 |
-
|
249 |
|
250 |
# Gradio interface
|
251 |
with gr.Blocks(title="Patient Emotion Recognition", theme="soft") as demo:
|
|
|
228 |
timeline_df = get_emotion_timeline()
|
229 |
advice = get_practitioner_advice(face_emotion, voice_emotion)
|
230 |
|
231 |
+
# Return values separately instead of as a dictionary
|
232 |
+
return (
|
233 |
+
face_emotion, # current_face
|
234 |
+
voice_emotion, # current_voice
|
235 |
+
timeline_df, # timeline
|
236 |
+
advice, # advice
|
237 |
+
str(face_details), # face_details
|
238 |
+
str(voice_details) # voice_details
|
239 |
+
)
|
240 |
except Exception as e:
|
241 |
print(f"Processing error: {str(e)}")
|
242 |
+
return (
|
243 |
+
"Error", # current_face
|
244 |
+
"Error", # current_voice
|
245 |
+
pd.DataFrame(), # timeline
|
246 |
+
"System error occurred", # advice
|
247 |
+
"", # face_details
|
248 |
+
"" # voice_details
|
249 |
+
)
|
250 |
|
251 |
# Gradio interface
|
252 |
with gr.Blocks(title="Patient Emotion Recognition", theme="soft") as demo:
|