Jaamie commited on
Commit
571c381
·
verified ·
1 Parent(s): 0a2ec0e

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -250,7 +250,7 @@ def process_query(user_query, input_type="text"):
250
  emotion_result = emotion_classifier(user_query)[0]
251
  print(f"Detected emotion: {emotion_result}")
252
  emotion = emotion_result['label']
253
- value = emotion_result['score']
254
 
255
  # Define RAG prompt
256
  prompt_in_chat_format = [
@@ -318,7 +318,7 @@ def process_query(user_query, input_type="text"):
318
  download_path = create_summary_txt(answer)
319
 
320
  timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
321
- user_id = session_data["latest"]["user_id"] # grab it from session
322
 
323
  # Prepend to the answer string
324
  answer_header = f"🧾 Session ID: {user_id}\n📅 Timestamp: {timestamp}\n\n"
 
250
  emotion_result = emotion_classifier(user_query)[0]
251
  print(f"Detected emotion: {emotion_result}")
252
  emotion = emotion_result['label']
253
+ value = round(emotion_result['score'], 2)
254
 
255
  # Define RAG prompt
256
  prompt_in_chat_format = [
 
318
  download_path = create_summary_txt(answer)
319
 
320
  timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
321
+ user_id = session_data["latest"]["user_id"]
322
 
323
  # Prepend to the answer string
324
  answer_header = f"🧾 Session ID: {user_id}\n📅 Timestamp: {timestamp}\n\n"